Part Number Hot Search : 
AM4426N X4165S8 LOQ971 1N4698 97A37 PLR131 FB3508 P10N6
Product Description
Full Text Search
 

To Download MCP2510 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ? 2000 microchip technology inc. preliminary ds21291c-page 1 MCP2510 features ? implements full can v2.0a and v2.0b at 1 mb/s - 0 - 8 byte message length - standard and extended data frames - programmable bit rate up to 1 mb/s - support for remote frames - two receive buffers with prioritized message storage - six full acceptance filters - two full acceptance filter masks - three transmit buffers with prioritization and abort features - loop-back mode for self test operation  hardware features - high speed spi interface (5 mhz at 4.5v i temp) - supports spi modes 0,0 and 1,1 - clock out pin with programmable prescaler - interrupt output pin with selectable enables - ?buffer full? output pins configureable as inter- rupt pins for each receive buffer or as general purpose digital outputs - ?request to send? input pins configureable as control pins to request immediate message transmission for each transmit buffer or as general purpose digital inputs - low power sleep mode  low power cmos technology - operates from 3.0v to 5.5v - 5 ma active current typical -10 a standby current typical at 5.5v  18-pin pdip/soic and 20-pin tssop packages  temperature ranges supported: description the microchip technology inc. MCP2510 is a full con- troller area network (can) protocol controller imple- menting can specification v2.0 a/b. it supports can 1.2, can 2.0a, can 2.0b passive, and can 2.0b active versions of the protocol, and is capable of trans- mitting and receiving standard and extended messages. it is also capable of both acceptance filtering and mes- sage management. it includes three transmit buffers and two receive buffers that reduce the amount of microcon- troller (mcu) management required. the mcu commu- nication is implemented via an industry standard serial peripheral interface (spi) with data rates up to 5mb/s. package types - industrial (i): -40 cto+85 c - extended (e): -40 c to +125 c 18 lead pdip txcan rxcan v dd reset cs so MCP2510 1 2 3 4 18 17 16 15 si sck int rx0bf 14 13 12 11 rx1bf 10 osc2 osc1 clkout tx2rts 5 6 7 8 vss 9 MCP2510 txcan rxcan tx0rts osc1 clkout osc2 cs v dd reset so sck int si rx0bf rx1bf vss tx0rts tx1rts tx1rts tx2rts 18 lead soic MCP2510 txcan rxcan tx0rts osc1 clkout osc2 cs v dd reset so sck int si rx0bf rx1bf vss 11 10 tx1rts tx2rts 20 lead tssop nc nc 1 2 3 4 5 6 7 8 9 18 17 16 15 14 13 12 13 12 1 2 3 4 5 6 7 8 9 20 19 18 17 16 15 14 11 10 stand-alone can controller with spi ? interface spi is a registered trademark of motorola inc.
MCP2510 ds21291c-page 2 preliminary ? 2000 microchip technology inc. table of contents 1.0 device functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.0 can message frames. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.0 message transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.0 message reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.0 bit timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.0 error detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 7.0 interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 8.0 oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 9.0 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 10.0 register map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 11.0 spi interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 12.0 electrical characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 13.0 packaging information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 on-line support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 reader response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 MCP2510 product identification system. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 list of figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 list of tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 list of registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 worldwide sales and service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 to our valued customers most current data sheet to obtain the most up-to-date version of this data sheet, please check our worldwide web site at: http://www.microchip.com you can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page . the last character of the literature number is the version number. e.g., ds30000a is version a of document ds30000. errata an errata sheet may exist for current devices, describing minor operational differences (from the data sheet) and recommended workarounds. as device/documentation issues become known to us, we will publish an errata sheet. the errata will specify the revision of silicon and revision of document to which it applies. to determine if an errata sheet exists for a particular device, please check with one of the following:  microchip ? s worldwide web site; http://www.microchip.com  your local microchip sales office (see last page)  the microchip corporate literature center; u.s. fax: (480) 792-7277 when contacting a sales office or the literature center, please specify which device, revision of silicon and data sheet (inclu de lit- erature number) you are using. corrections to this data sheet we constantly strive to improve the quality of all our products and documentation. we have spent a great deal of time to ensure that this document is correct. however, we realize that we may have missed a few things. if you find any information that is mi ssing or appears in error, please:  fill out and mail in the reader response form in the back of this data sheet.  e-mail us at webmaster@microchip.com. we appreciate your assistance in making this a better document.
? 2000 microchip technology inc. preliminary ds21291c-page 3 MCP2510 1.0 device functionality 1.1 overview the MCP2510 is a stand-alone can controller devel- oped to simplify applications that require interfacing with a can bus. a simple block diagram of the MCP2510 is shown in figure 1-1. the device consists of three main blocks: 1. the can protocol engine, 2. the control logic and sram registers that are used to configure the device and its operation, and 3. the spi protocol block. a typical system implementation using the device is shown in figure 1-2. the can protocol engine handles all functions for receiving and transmitting messages on the bus. mes- sages are transmitted by first loading the appropriate message buffer and control registers. transmission is initiated by using control register bits, via the spi inter- face, or by using the transmit enable pins. status and errors can be checked by reading the appropriate reg- isters. any message detected on the can bus is checked for errors and then matched against the user defined filters to see if it should be moved into one of the two receive buffers. the mcu interfaces to the device via the spi interface. writing to and reading from all registers is done using standard spi read and write commands. interrupt pins are provided to allow greater system flex- ibility. there is one multi-purpose interrupt pin as well as specific interrupt pins for each of the receive regis- ters that can be used to indicate when a valid message has been received and loaded into one of the receive buffers. use of the specific interrupt pins is optional, and the general purpose interrupt pin as well as status registers (accessed via the spi interface) can also be used to determine when a valid message has been received. there are also three pins available to initiate immediate transmission of a message that has been loaded into one of the three transmit registers. use of these pins is optional and initiating message transmission can also be done by utilizing control registers accessed via the spi interface. table 1-1 gives a complete list of all of the pins on the MCP2510. figure 1-1: block diagram 3 tx buffers 2 rx buffers message assembly 6 acceptance filters spi interface logic spi bus int buffer cs sck si so can protocol engine rxcan txcan control logic rx0bf rx1bf tx0rts tx1rts tx2rts
MCP2510 ds21291c-page 4 preliminary ? 2000 microchip technology inc. figure 1-2: typical system implementation table 1-1: pin descriptions name dip/ soic pin # tssop pin # i/o/p type description txcan 11o transmit output pin to can bus rxcan 22 i receive input pin from can bus clkout 33o clock output pin with programmable prescaler tx0rts 44 i transmit buffer txb0 request to send or general purpose digital input. -100k tx1rts 55 i transmit buffer txb1 request to send or general purpose digital input. -100k tx2rts 67 i transmit buffer txb2 request to send or general purpose digital input. -100k osc2 78o oscillator output osc1 89 i oscillator input v ss 910p ground reference for logic and i/o pins rx1bf 10 11 o receive buffer rxb1 interrupt pin or general purpose digital output rx0bf 11 12 o receive buffer rxb0 interrupt pin or general purpose digital output int 12 13 o interrupt output pin sck 13 14 i clock input pin for spi interface si 14 16 i data input pin for spi interface so 15 17 o data output pin for spi interface cs 16 18 i chip select input pin for spi interface reset 17 19 i active low device reset input v dd 18 20 p positive supply for logic and i/o pins nc ? 6,15 ? no internal connection note: type identification: i=input; o=output; p=power MCP2510 spi MCP2510 MCP2510 MCP2510 interface can bus MCP2510 can transceiver node controller main system controller can transceiver can transceiver can transceiver can transceiver node controller node controller node controller
? 2000 microchip technology inc. preliminary ds21291c-page 5 MCP2510 1.2 transmit/receive buffers the MCP2510 has three transmit and two receive buffers, two acceptance masks (one for each receive buffer), and a total of six acceptance filters. figure 1-3 is a block diagram of these buffers and their connection to the protocol engine. figure 1-3: can buffers and protocol engine block diagram acceptance filter rxf2 r x b 1 identifier data field data field identifier acceptance mask rxm1 acceptance filter rxf3 acceptance filter rxf4 acceptance filter rxf5 m a b acceptance filter rxf0 acceptance filter rxf1 r x b 0 txreq txb2 abtf mloa txerr message message queue control transmit byte sequencer txreq txb0 abtf mloa txerr message crc<14:0> comparator receive<7:0> transmit<7:0> receive error transmit error protocol rec tec errpas busoff finite state machine counter counter shift<14:0> {transmit<5:0>, receive<8:0>} transmit logic bit timing logic tx rx configuration registers clock generator protocol engine buffers txreq txb1 abtf mloa txerr message a c c e p t acceptance mask rxm0 a c c e p t
MCP2510 ds21291c-page 6 preliminary ? 2000 microchip technology inc. 1.3 can protocol engine the can protocol engine combines several functional blocks, shown in figure 1-4. these blocks and their functions are described below. 1.4 protocol finite state machine the heart of the engine is the finite state machine (fsm). this state machine sequences through mes- sages on a bit by bit basis, changing states as the fields of the various frame types are transmitted or received. the fsm is a sequencer controlling the sequential data stream between the tx/rx shift register, the crc reg- ister, and the bus line. the fsm also controls the error management logic (eml) and the parallel data stream between the tx/rx shift registers and the buffers. the fsm insures that the processes of reception, arbitration, transmission, and error signaling are performed accord- ing to the can protocol. the automatic retransmission of messages on the bus line is also handled by the fsm. 1.5 cyclic redundancy check the cyclic redundancy check register generates the cyclic redundancy check (crc) code which is trans- mitted after either the control field (for messages with 0 data bytes) or the data field, and is used to check the crc field of incoming messages. 1.6 error management logic the error management logic is responsible for the fault confinement of the can device. its two counters, the receive error counter (rec) and the transmit error counter (tec), are incremented and decremented by commands from the bit stream processor. according to the values of the error counters, the can controller is set into the states error-active, error-passive or bus-off. 1.7 bit timing logic the bit timing logic (btl) monitors the bus line input and handles the bus related bit timing according to the can protocol. the btl synchronizes on a recessive to dominant bus transition at start of frame (hard syn- chronization) and on any further recessive to dominant bus line transition if the can controller itself does not transmit a dominant bit (resynchronization). the btl also provides programmable time segments to com- pensate for the propagation delay time, phase shifts, and to define the position of the sample point within the bit time. the programming of the btl depends upon the baud rate and external physical delay times. figure 1-4: can protocol engine block diagram bit timing logic crc<14:0> comparator receive<7:0> transmit<7:0> sample<2:0> majority decision stuffreg<5:0> comparator transmit logic receive error counter transmit error counter protocol fsm rx sam busmon rec/trm addr. recdata<7:0> trmdata<7:0> shift<14:0> (transmit<5:0>, receive<7:0>) tx rec tec errpas busoff interface to standard buffer
? 2000 microchip technology inc. preliminary ds21291c-page 7 MCP2510 2.0 can message frames the MCP2510 supports standard data frames, extended data frames, and remote frames (standard and extended) as defined in the can 2.0b specification. 2.1 standard data frame the can standard data frame is shown in figure 2-1. in common with all other frames, the frame begins with a start of frame (sof) bit, which is of the dominant state, which allows hard synchronization of all nodes. the sof is followed by the arbitration field, consisting of 12 bits; the 11-bit ldentifier and the remote trans- mission request (rtr) bit. the rtr bit is used to dis- tinguish a data frame (rtr bit dominant) from a remote frame (rtr bit recessive). following the arbitration field is the control field, con- sisting of six bits. the first bit of this field is the identifier extension (ide) bit which must be dominant to specify a standard frame. the following bit, reserved bit zero (rb0), is reserved and is defined to be a dominant bit by the can protocol. the remaining four bits of the con- trol field are the data length code (dlc) which speci- fies the number of bytes of data contained in the message. after the control field is the data field, which contains any data bytes that are being sent, and is of the length defined by the dlc above (0-8 bytes). the cyclic redundancy check (crc) field follows the data field and is used to detect transmission errors. the crc field consists of a 15-bit crc sequence, followed by the recessive crc delimiter bit. the final field is the two-bit acknowledge field. during the ack slot bit, the transmitting node sends out a recessive bit. any node that has received an error free frame acknowledges the correct reception of the frame by sending back a dominant bit (regardless of whether the node is configured to accept that specific message or not). the recessive acknowledge delimiter com- pletes the acknowledge field and may not be overwrit- ten by a dominant bit. 2.2 extended data frame in the extended can data frame, shown in figure 2-2, the sof bit is followed by the arbitration field which consists of 32 bits. the first 11 bits are the most signif- icant bits (base-ld) of the 29-bit identifier. these 11 bits are followed by the substitute remote request (srr) bit which is defined to be recessive. the srr bit is fol- lowed by the lde bit which is recessive to denote an extended can frame. it should be noted that if arbitration remains unresolved after transmission of the first 11 bits of the identifier, and one of the nodes involved in the arbitration is send- ing a standard can frame (11-bit identifier), then the standard can frame will win arbitration due to the assertion of a dominant lde bit. also, the srr bit in an extended can frame must be recessive to allow the assertion of a dominant rtr bit by a node that is send- ing a standard can remote frame. the srr and lde bits are followed by the remaining 18 bits of the identifier (extended ld) and the remote trans- mission request bit. to enable standard and extended frames to be sent across a shared network, it is necessary to split the 29-bit extended message identifier into 11-bit (most significant) and 18-bit (least significant) sections. this split ensures that the lde bit can remain at the same bit position in both standard and extended frames. following the arbitration field is the six-bit control field. the first two bits of this field are reserved and must be dominant. the remaining four bits of the control field are the data length code (dlc) which specifies the num- ber of data bytes contained in the message. the remaining portion of the frame (data field, crc field, acknowledge field, end of frame and lntermission) is constructed in the same way as for a standard data frame (see section 2.1). 2.3 remote frame normally, data transmission is performed on an auton- omous basis by the data source node (e.g. a sensor sending out a data frame). it is possible, however, for a destination node to request data from the source. to accomplish this, the destination node sends a remote frame with an identifier that matches the identifier of the required data frame. the appropriate data source node will then send a data frame in response to the remote frame request. there are two differences between a remote frame (shown in figure 2-3) and a data frame. first, the rtr bit is at the recessive state, and second, there is no data field. in the event of a data frame and a remote frame with the same identifier being transmitted at the same time, the data frame wins arbitration due to the dominant rtr bit following the identifier. in this way, the node that transmitted the remote frame receives the desired data immediately.
MCP2510 ds21291c-page 8 preliminary ? 2000 microchip technology inc. 2.4 error frame an error frame is generated by any node that detects a bus error. an error frame, shown in figure 2-4, con- sists of two fields, an error flag field followed by an error delimiter field. there are two types of error flag fields. which type of error flag field is sent depends upon the error status of the node that detects and generates the error flag field. if an error-active node detects a bus error then the node interrupts transmission of the current message by generating an active error flag. the active error flag is composed of six consecutive dominant bits. this bit sequence actively violates the bit stuffing rule. all other stations recognize the resulting bit stuffing error and in turn generate error frames themselves, called error echo flags. the error flag field, therefore, consists of between six and twelve consecutive dominant bits (generated by one or more nodes). the error delimiter field completes the error frame. after completion of the error frame, bus activity returns to normal and the inter- rupted node attempts to resend the aborted message. if an error-passive node detects a bus error then the node transmits an error-passive flag followed by the error delimiter field. the error-passive flag consists of six consecutive recessive bits, and the error frame for an error-passive node consists of 14 recessive bits. from this, it follows that unless the bus error is detected by the node that is actually transmitting, the transmission of an error frame by an error-passive node will not affect any other node on the network. if the transmitting node generates an error-passive flag then this will cause other nodes to generate error frames due to the resulting bit stuffing violation. after transmission of an error frame, an error-passive node must wait for six consecutive recessive bits on the bus before attempting to rejoin bus communications. the error delimiter consists of eight recessive bits and allows the bus nodes to restart bus communications cleanly after an error has occurred. 2.5 overload frame an overload frame, shown in figure 2-5, has the same format as an active error frame. an overload frame, however can only be generated during an lnter- frame space. in this way an overload frame can be dif- ferentiated from an error frame (an error frame is sent during the transmission of a message). the overload frame consists of two fields, an overload flag followed by an overload delimiter. the overload flag consists of six dominant bits followed by overload flags generated by other nodes (and, as for an active error flag, giving a maximum of twelve dominant bits). the overload delimiter consists of eight recessive bits. an overload frame can be generated by a node as a result of two conditions. first, the node detects a dominant bit during the interframe space which is an illegal condition. sec- ond, due to internal conditions the node is not yet able to start reception of the next message. a node may generate a maximum of two sequential overload frames to delay the start of the next message. 2.6 interframe space the lnterframe space separates a preceeding frame (of any type) from a subsequent data or remote frame. the interframe space is composed of at least three recessive bits called the intermission. this is provided to allow nodes time for internal processing before the start of the next message frame. after the intermission, the bus line remains in the recessive state (bus idle) until the next transmission starts.
? 2000 microchip technology inc. preliminary ds21291c-page 9 MCP2510 figure 2-1: standard data frame s 0 0 0 0 1 1 1 1 1 1 1 1 start of frame data frame (number of bits = 44 + 8n) 12 arbitration field id 10 11 id3 id0 identifier message filtering stored in buffers rtr ide rb0 dlc3 dlc0 6 4 control field data length code reserved bit 8n (0 n 8) data field 8 8 stored in transmit/receive buffers bit stuffing 16 crc field 15 crc 7 end of frame crc del ack slot bit ack del ifs 1 1 1 1
MCP2510 ds21291c-page 10 preliminary ? 2000 microchip technology inc. figure 2-2: extended data frame 0 1 1 0 0 0 1 start of frame arbitration field 32 11 id10 id3 id0 ide identifier message filtering stored in buffers srr eid17 eid0 rtr rb1 rb0 dlc3 18 dlc0 6 control field 4 reserved bits data length code stored in transmit/receive buffers 8 8 data frame (number of bits = 64 + 8n) 8n (0 n 8) data field 1 1 1 1 1 1 1 1 16 crc field 15 crc crc del ack slot bit ack del end of frame 7 bit stuffing ifs extended identifier 1 1 1
? 2000 microchip technology inc. preliminary ds21291c-page 11 MCP2510 figure 2-3: remote data frame 0 1 1 1 0 0 start of frame arbitration field 32 11 id10 id3 id0 ide identifier message filtering srr eid17 eid0 rtr rb1 rb0 dlc3 18 dlc0 6 control field 4 reserved bits data length code extended identifier 1 1 1 1 1 1 1 1 1 16 crc field 15 crc crc del ack slot bit ack del end of frame 7 remote data frame with extended identifier 1 1 1 ifs
MCP2510 ds21291c-page 12 preliminary ? 2000 microchip technology inc. figure 2-4: error frame 0 0 0 0 start of frame interrupted data frame 12 arbitration field id 10 11 id3 id0 identifier message filtering rtr ide rb0 dlc3 dlc0 6 4 control field data length code reserved bit 8n (0 n 8) data field 8 8 bit stuffing 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 data frame or remote frame error frame 6 error flag 6 echo error flag 8 error delimiter inter-frame space or overload frame
? 2000 microchip technology inc. preliminary ds21291c-page 13 MCP2510 figure 2-5: overload frame 0 1 0 0 1 1 1 1 1 1 1 1 1 start of frame remote frame (number of bits = 44) 12 arbitration field id 10 11 id0 rtr ide rb0 dlc3 dlc0 6 4 control field 16 crc field 15 crc 7 end of frame crc del ack slot bit ack del 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 overload frame end of frame or error delimiter or overload delimiter 6 overload flag overload delimiter 8 inter-frame space or error frame
MCP2510 ds21291c-page 14 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 15 MCP2510 3.0 message transmission 3.1 transmit buffers the MCP2510 implements three transmit buffers. each of these buffers occupies 14 bytes of sram and are mapped into the device memory maps. the first byte, txb n ctrl, is a control register associated with the mes- sage buffer. the information in this register determines the conditions under which the message will be transmit- ted and indicates the status of the message transmission. (see register 3-2). five bytes are used to hold the stan- dard and extended identifiers and other message arbitra- tion information (see register 3-3 through register 3-8). the last eight bytes are for the eight possible data bytes of the message to be transmitted (see register 3-8). for the mcu to have write access to the message buffer, the txb n ctrl.txreq bit must be clear, indicating that the message buffer is clear of any pending message to be transmitted. at a minimum, the txb n sidh, txb n sidl, and txb n dlc registers must be loaded. if data bytes are present in the message, the txb n dm registers must also be loaded. if the message is to use extended identifiers, the txb n eidm registers must also be loaded and the txb n sidl.exide bit set. prior to sending the message, the mcu must initialize the caninte.txi n e bit to enable or disable the gener- ation of an interrupt when the message is sent. the mcu must also initialize the txb n ctrl.txp priority bits (see section 3.2). 3.2 transmit priority transmit priority is a prioritization, within the MCP2510, of the pending transmittable messages. this is indepen- dent from, and not necessarily related to, any prioritiza- tion implicit in the message arbitration scheme built into the can protocol. prior to sending the sof, the priority of all buffers that are queued for transmission is com- pared. the transmit buffer with the highest priority will be sent first. for example, if transmit buffer 0 has a higher priority setting than transmit buffer 1, buffer 0 will be sent first. if two buffers have the same priority setting, the buffer with the highest buffer number will be sent first. for example, if transmit buffer 1 has the same priority setting as transmit buffer 0, buffer 1 will be sent first. there are four levels of transmit priority. if txb n ctrl.txp<1:0> for a particular message buffer is set to 11, that buffer has the highest possible priority. if txb n ctrl.txp<1:0> for a particular message buffer is 00, that buffer has the low- est possible priority. 3.3 initiating transmission to initiate message transmission the txb n ctrl.txreq bit must be set for each buffer to be transmitted. this can be done by writing to the register via the spi interface or by setting the tx n rts pin low for the particular transmit buffer(s) that are to be transmitted. if transmission is initi- ated via the spi interface, the txreq bit can be set at the same time as the txp priority bits. when txb n ctrl.txreq is set, the txb n ctrl.abtf, txb n ctrl.mloa and txb n ctrl.txerr bits will be cleared. setting the txb n ctrl.txreq bit does not initiate a message transmission, it merely flags a message buffer as ready for transmission. transmission will start when the device detects that the bus is available. the device will then begin transmission of the highest prior- ity message that is ready. when the transmission has completed successfully the txb n ctrl.txreq bit will be cleared, the can- intf.tx n if bit will be set, and an interrupt will be gen- erated if the caninte.tx n ie bit is set. if the message transmission fails, the txb n c- trl.txreq will remain set indicating that the message is still pending for transmission and one of the following con- dition flags will be set. if the message started to transmit but encountered an error condition, the txb n ctrl. txerr and the canintf.merrf bits will be set and an interrupt will be generated on the int pin if the can- inte.merre bit is set. if the message lost arbitration the txb n ctrl.mloa bit will be set. 3.4 txnrts pins the tx n rts pins are input pins that can be configured as request-to-send inputs, which provides a secondary means of initiating the transmission of a message from any of the transmit buffers, or as standard digital inputs. configuration and control of these pins is accomplished using the txrtsctrl register (see register 3-2). the txrtsctrl register can only be modified when the MCP2510 is in configuration mode (see section 9.0). if configured to operate as a request to send pin, the pin is mapped into the respective txb n ctrl.txreq bit for the transmit buffer. the txreq bit is latched by the falling edge of the tx n rts pin. the tx n rts pins are designed to allow them to be tied directly to the rx n bf pins to automatically initiate a message transmission when the rx n bf pin goes low. the tx n rts pins have internal pullup resistors of 100k ohms (nominal). 3.5 aborting transmission the mcu can request to abort a message in a specific message buffer by clearing the associated txbnc- trl.txreq bit. also, all pending messages can be requested to be aborted by setting the can- ctrl.abat bit. if the canctrl.abat bit is set to abort all pending messages, the user must reset this bit (typically after the user verifies that all txreq bits have been cleared) to continue trasmit messages. the canctrl.abtf flag will only be set if the abort was requested via the canctrl.abat bit. aborting a mes- sage by resetting the txreq bit does not cause the atbf bit to be set. only messages that have not already begun to be transmitted can be aborted. once a message has begun transmission, it will not be possible for the user to reset the txbnctrl.txreq bit. after transmission
MCP2510 ds21291c-page 16 preliminary ? 2000 microchip technology inc. of a message has begun, if an error occurs on the bus or if the message loses arbitration, the message will be retransmitted regardless of a request to abort. figure 3-1: transmit message flowchart start is can bus available to start transmission no examine txb n ctrl.txp <1:0> to are any txb n ctrl.txreq ? bits = 1 the message transmission sequence begins when the device determines that the txb n ctrl.txreq for any of the transmit registers has been set. clear: txb n ctrl.abtf txb n ctrl.mloa txb n ctrl.txerr yes ? is txb n ctrl.txreq=0 canctrl.abat=1 clearing the txb n ctrl.txreq bit while it is set, or setting the canctrl.abat bit before the message has started transmission will abort the message. no transmit message was message transmitted successfully? no yes set txb n ctrl.txreq=0 caninte.txnie=1? generate interrupt yes ye s yes set did a message error occur? was arbitration lost during transmission? set txb n ctrl.txerr=1 yes no no determine highest priority message no ? set txb n ctrl.mloa=1 the caninte.txnie bit determines if an interrupt should be generated when a message is successfully transmitted. goto start cantinf.tx n if=1 yes or no
? 2000 microchip technology inc. preliminary ds21291c-page 17 MCP2510 register 3-1: txb n ctrl transmit buffer n control register (address: 30h, 40h, 50h) u-0 r-0 r-0 r-0 r/w-0 u-0 r/w-0 r/w-0 ? abtf mloa txerr txreq ? txp1 txp0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6: abtf : message aborted flag 1 = message was aborted 0 = message completed transmission successfully bit 5: mloa : message lost arbitration 1 = message lost arbitration while being sent 0 = message did not lose arbitration while being sent bit 4: txerr : transmission error detected 1 = a bus error occurred while the message was being transmitted 0 = no bus error occurred while the message was being transmitted bit 3: txreq : message transmit request 1 = buffer is currently pending transmission (mcu sets this bit to request message be transmitted - bit is automatically cleared when the message is sent) 0 = buffer is not currently pending transmission (mcu can clear this bit to request a message abort) bit 2: unimplemented : reads as ? 0 ? bit 1-0: txp<1:0> : transmit buffer priority 11 = highest message priority 10 = high intermediate message priority 01 = low intermediate message priority 00 = lowest message priority
MCP2510 ds21291c-page 18 preliminary ? 2000 microchip technology inc. register 3-2: txrtsctrl - tx n rts pin control and status register (address: 0dh) register 3-3: txb n sidh - transmit buffer n standard identifier high (address: 31h, 41h, 51h) u-0 u-0 r-x r-x r-x r/w-0 r/w-0 r/w-0 ? ? b2rts b1rts b0rts b2rtsm b1rtsm b0rtsm r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6: unimplemented : reads as ? 0 ? bit 5: b2rts : tx2rts pin state - reads state of tx2rts pin when in digital input mode - reads as ? 0 ? when pin is in ? request to send ? mode bit 4: b1rts : tx1rtx pin state - reads state of tx1rts pin when in digital input mode - reads as ? 0 ? when pin is in ? request to send ? mode bit 3: b0rts : tx0rts pin state - reads state of tx0rts pin when in digital input mode - reads as ? 0 ? when pin is in ? request to send ? mode bit 2: b2rtsm : tx2rts pin mode 1 = pin is used to request message transmission of txb2 buffer (on falling edge) 0 = digital input bit 1: b1rtsm : tx1rts pin mode 1 = pin is used to request message transmission of txb1 buffer (on falling edge) 0 = digital input bit 0: b0rtsm : tx0rts pin mode 1 = pin is used to request message transmission of txb0 buffer (on falling edge) 0 = digital input r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: sid<10:3> : standard identifier bits <10:3>
? 2000 microchip technology inc. preliminary ds21291c-page 19 MCP2510 register 3-4: txb n sidl - transmit buffer n standard identifier low (address: 32h, 42h, 52h) register 3-5: txb n eid8 - transmit buffer n extended identifier high (address: 33h, 43h, 53h) register 3-6: txb n eid0 - transmit buffer n extended identifier low (address: 34h, 44h, 54h) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid2 sid1 sid0 ? exide ? eid17 eid16 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-5: sid<2:0> : standard identifier bits <2:0> bit 4: unimplemented : reads as '0 ? bit 3: exide : extended identifier enable 1 = message will transmit extended identifier 0 = message will transmit standard identifier bit 2: unimplemented : reads as '0 ? bit 1-0: eid<17:16> : extended identifier bits <17:16> r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<15:8> : extended identifier bits <15:8> r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<7:0> : extended identifier bits <7:0>
MCP2510 ds21291c-page 20 preliminary ? 2000 microchip technology inc. register 3-7: txb n dlc - transmit buffer n data length code (address: 35h, 45h, 55h) register 3-8: txb n d m - transmit buffer n data field byte m (address: 36h-3dh, 46h-4dh, 56h-5dh) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x ? rtr ? ? dlc3 dlc2 dlc1 dlc0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented: reads as ? 0 ? bit 6: rtr : remote transmission request bit 1 = transmitted message will be a remote transmit request 0 = transmitted message will be a data frame bit 5-4: unimplemented: reads as ? 0 ? bit 3-0: dlc<3:0> : data length code sets the number of data bytes to be transmitted (0 to 8 bytes) note: it is possible to set the dlc to a value greater than 8, however only 8 bytes are transmitted r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x txb n dm7 txb n dm6 txb n dm5 txb n dm4 txb n dm3 txb n dm2 txb n dm1 txb n dm0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: txb n d m 7:txb n d m 0 : transmit buffer n data field byte m
? 2000 microchip technology inc. preliminary ds21291c-page 21 MCP2510 4.0 message reception 4.1 receive message buffering the MCP2510 includes two full receive buffers with multiple acceptance filters for each. there is also a separate message assembly buffer (mab) which acts as a third receive buffer (see figure 4-1). 4.2 receive buffers of the three receive buffers, the mab is always com- mitted to receiving the next message from the bus. the remaining two receive buffers are called rxb0 and rxb1 and can receive a complete message from the protocol engine. the mcu can access one buffer while the other buffer is available for message reception or holding a previously received message. the mab assembles all messages received. these messages will be transferred to the rxb n buffers (see register 4-4 to register 4-9) only if the acceptance fil- ter criteria are met. when a message is moved into either of the receive buffers the appropriate canintf.rx n if bit is set. this bit must be cleared by the mcu, when it has completed processing the message in the buffer, in order to allow a new message to be received into the buffer. this bit provides a positive lockout to ensure that the mcu has finished with the message before the MCP2510 attempts to load a new message into the receive buffer. if the caninte.rx n ie bit is set an interrupt will be gen- erated on the int pin to indicate that a valid message has been received. 4.3 receive priority rxb0 is the higher priority buffer and has two message acceptance filters associated with it. rxb1 is the lower priority buffer and has four acceptance filters associ- ated with it. the lower number of acceptance filters makes the match on rxb0 more restrictive and implies a higher priority for that buffer. additionally, the rxb0ctrl register can be configured such that if rxb0 contains a valid message, and another valid message is received, an overflow error will not occur and the new message will be moved into rxb1 regard- less of the acceptance criteria of rxb1. there are also two programmable acceptance filter masks available, one for each receive buffer (see section 4.5). when a message is received, bits <3:0> of the rxb n ctrl register will indicate the acceptance filter number that enabled reception, and whether the received message is a remote transfer request. the rxb n ctrl.rxm bits set special receive modes. normally, these bits are set to 00 to enable reception of all valid messages as determined by the appropriate acceptance filters. in this case, the determination of whether or not to receive standard or extended mes- sages is determined by the rfx n sidl.exide bit in the acceptance filter register. if the rxb n ctrl.rxm bits are set to 01 or 10, the receiver will accept only mes- sages with standard or extended identifiers respec- tively. if an acceptance filter has the rfx n sidl.exide bit set such that it does not correspond with the rxb n ctrl.rxm mode, that acceptance filter is ren- dered useless. these two modes of rxb n ctrl.rxm bits can be used in systems where it is known that only standard or extended messages will be on the bus. if the rxb n ctrl.rxm bits are set to 11, the buffer will receive all messages regardless of the values of the acceptance filters. also, if a message has an error before the end of frame, that portion of the message assembled in the mab before the error frame will be loaded into the buffer. this mode has some value in debugging a can system and would not be used in an actual system environment. 4.4 rx0bf and rx1bf pins in addition to the int pin which provides an interrupt signal to the mcu for many different conditions, the receive buffer full pins (rx0bf and rx1bf ) can be used to indicate that a valid message has been loaded into rxb0 or rxb1, respectively. the rxb n bf full pins can be configured to act as buffer full interrupt pins or as standard digital outputs. config- uration and status of these pins is available via the bfpctrl register (register 4-3). when set to operate in interrupt mode (by setting bfpctrl.bxbfe and bfpctrl.bxbfm bits to a 1), these pins are active low and are mapped to the canintf.rx n if bit for each receive buffer. when this bit goes high for one of the receive buffers, indicating that a valid message has been loaded into the buffer, the corresponding rx n bf pin will go low. when the canintf.rx n if bit is cleared by the mcu, then the corresponding interrupt pin will go to the logic high state until the next message is loaded into the receive buffer. when used as digital outputs the bfpctrl.bxbfm and bfpctrl.bxbfe bits must be set to a ? 1 ? for the associated buffer. in this mode the state of the pin is controlled by the bfpctrl.bxbfs bits. writting a ? 1 ? to the bxbfs bit will cause a high level to be driven on the assicated buffer full pin, and a ? 0 ? will cause the pin to drive low. when using the pins in this mode the state of the pin should be modified only by using the bit mod- ify spi command to prevent glitches from occuring on either of the buffer full pins. note: the entire contents of the mab is moved into the receive buffer once a message is accepted. this means that regardless of the type of identifier (standard or extended) and the number of data bytes received, the entire receive buffer is overwritten with the mab contents. therefore the contents of all regis- ters in the buffer must be assumed to have been modified when any message is received.
MCP2510 ds21291c-page 22 preliminary ? 2000 microchip technology inc. figure 4-1: receive buffer block diagram acceptance mask rxm1 acceptance filter rxf2 acceptance filter rxf3 acceptance filter rxf4 acceptance filter rxf5 acceptance mask rxm0 acceptance filter rxf0 acceptance filter rxf1 identifier data field data field identifier a c c e p t a c c e p t r x b 0 r x b 1 m a b
? 2000 microchip technology inc. preliminary ds21291c-page 23 MCP2510 figure 4-2: message reception flowchart set rxbf0 start detect start of message ? valid message received ? generate error message identifier meets a filter criteria ? is canintf.rx0if=0 ? go to start move message into rxb0 set rxb0ctrl.filhit <2:0> is canintf.rx1if = 0 ? move message into rxb1 set canintf.rx1if=1 yes, meets criteria for rxbo no generate interrupt on int yes yes no no ye s yes no no yes yes frame the canintf.rx n if bit determines if the receive register is empty and able to accept a new message no yes no begin loading message into message assembly buffer (mab) according to which filter criteria was met set rxb0ctrl.filhit <0> according to which filter criteria set canstat <3:0> accord- ing to which receive buffer the message was loaded into is rxb0ctrl.bukt=1 ? the rxb0ctrl.bukt bit determines if rxb0 can roll over into rxb1 generate overflow error: set eflg.rx1ovr is caninte.errie=1 ? no go to start yes no are bfpctrl.b0bfm=1 ? bf1ctrl.b0bfe=1 and pin = 0 no set rxbf1 pin = 0 no yes ye s caninte.rx0ie=1? caninte.rx1ie=1? rxb1 rxb0 yes, meets criteria for rxb1 set eflg.rx0ovr generate overflow error: set canintf.rx0if=1 are bfpctrl.b1bfm=1 ? bf1ctrl.b1bfe=1 and
MCP2510 ds21291c-page 24 preliminary ? 2000 microchip technology inc. register 4-1: rxb0ctrl - receive buffer 0 control register (address: 60h) u-0 r/w-0 r/w-0 u-0 r-0 r/w-0 r-0 r-0 ? rxm1 rxm0 ? rxrtr bukt bukt1 filhit0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6-5: rxm<1:0> : receive buffer operating mode 11 = turn mask/filters off; receive any message 10 = receive only valid messages with extended identifiers that meet filter criteria 01 = receive only valid messages with standard identifiers that meet filter criteria 00 = receive all valid messages using either standard or extended identifiers that meet filter criteria bit 4: unimplemented : reads as ? 0 ? bit 3: rxrtr : received remote transfer request 1 = remote transfer request received 0 = no remote transfer request received bit 2: bukt : rollover enable 1 = rxb0 message will rollover and be written to rxb1 if rxb0 is full 0 = rollover disabled bit 1: bukt1 : read only copy of bukt bit (used internally by the MCP2510). bit 0: filhit<0> : filter hit - indicates which acceptance filter enabled reception of message 1 = acceptance filter 1 (rxf1) 0 = acceptance filter 0 (rxf0) note: if a rollover from rxb0 to rxb1 occurs, the filhit bit will reflect the filter that accepted the mes- sage that rolled over
? 2000 microchip technology inc. preliminary ds21291c-page 25 MCP2510 register 4-2: rxb1ctrl - receive buffer 1 control register (address: 70h) u-0 r/w-0 r/w-0 u-0 r-0 r-0 r-0 r-0 ? rxm1 rxm0 ? rxrtr filhit2 filhit1 filhit0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6-5: rxm<1:0> : receive buffer operating mode 11 = turn mask/filters off; receive any message 10 = receive only valid messages with extended identifiers that meet filter criteria 01 = receive only valid messages with standard identifiers that meet filter criteria 00 = receive all valid messages using either standard or extended identifiers that meet filter criteria bit 4: unimplemented : reads as ? 0 ? bit 3: rxrtr : received remote transfer request 1 = remote transfer request received 0 = no remote transfer request received bit 2-0: filhit<2:0> : filter hit - indicates which acceptance filter enabled reception of message 101 = acceptance filter 5 (rxf5) 100 = acceptance filter 4 (rxf4) 011 = acceptance filter 3 (rxf3) 010 = acceptance filter 2 (rxf2) 001 = acceptance filter 1 (rxf1) (only if bukt bit set in rxb0ctrl) 000 = acceptance filter 0 (rxf0) (only if bukt bit set in rxb0ctrl)
MCP2510 ds21291c-page 26 preliminary ? 2000 microchip technology inc. register 4-3: bfpctrl - rx n bf pin control and status register (address: 0ch) register 4-4: rxb n sidh - receive buffer n standard identifier high (address: 61h, 71h) u-0 u-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 ? ? b1bfs b0bfs b1bfe b0bfe b1bfm b0bfm r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6: unimplemented : reads as ? 0 ? bit 5: b1bfs : rx1bf pin state (digital output mode only) reads as 0 when rx1bf is configured as interrupt pin bit 4: b0bfs : rx0bf pin state (digital output mode only) reads as 0 when rx0bf is configured as interrupt pin bit 3: b1bfe : rx1bf pin function enable 1 = pin function enabled, operation mode determined by b1bfm bit 0 = pin function disabled, pin goes to high impedance state bit 2: b0bfe : rx0bf pin function enable 1 = pin function enabled, operation mode determined by b0bfm bit 0 = pin function disabled, pin goes to high impedance state bit 1: b1bfm : rx1bf pin operation mode 1 = pin is used as interrupt when valid message loaded into rxb1 0 = digital output mode bit 0: b0bfm : rx0bf pin operation mode 1 = pin is used as interrupt when valid message loaded into rxb0 0 = digital output mode r-x r-x r-x r-x r-x r-x r-x r-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: sid<10:3> : standard identifier bits <10:3> these bits contain the eight most significant bits of the standard identifier for the received message
? 2000 microchip technology inc. preliminary ds21291c-page 27 MCP2510 register 4-5: rxb n sidl - receive buffer n standard identifier low (address: 62h, 72h) register 4-6: rxb n eid8 - receive buffer n extended identifier mid (address: 63h, 73h) register 4-7: rxb n eid0 - receive buffer n extended identifier low (address: 64h, 74h) r-x r-x r-x r-x r-x u-0 r-x r-x sid2 sid1 sid0 srr ide ? eid17 eid16 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-5: sid<2:0> : standard identifier bits <2:0> these bits contain the three least significant bits of the standard identifier for the received message bit 4: srr: standard frame remote transmit request bit (valid only if ide bit = ? 0 ? ) 1 = standard frame remote transmit request received 0 = standard data frame recieved bit 3: ide: extended identifier flag this bit indicates whether the received message was a standard or an extended frame 1 = received message was an extended frame 0 = received message was a standard frame bit 2: unimplemented: reads as '0' bit 1-0: eid<17:16> : extended identifier bits <17:16> these bits contain the two most significant bits of the extended identifier for the received message r-x r-x r-x r-x r-x r-x r-x r-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<15:8> : extended identifier bits <15:8> these bits hold bits 15 through 8 of the extended identifier for the received message r-x r-x r-x r-x r-x r-x r-x r-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<7:0> : extended identifier bits <7:0> these bits hold the least significant eight bits of the extended identifier for the received message
MCP2510 ds21291c-page 28 preliminary ? 2000 microchip technology inc. register 4-8: rxb n dlc - receive buffer n data length code (address: 65h, 75h) register 4-9: rxb n d m - receive buffer n data field byte m (address: 66h-6dh, 76h-7dh) u-0 r-x r-x r-x r-x r-x r-x r-x ? rtr rb1 rb0 dlc3 dlc2 dlc1 dlc0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6: rtr : extended frame remote transmission request bit (valid only when rxbnsidl.ide = 1) 1 = extended frame remote transmit request received 0 = extended data frame received bit 5: rb1: reserved bit 1 bit 4: rb0: reserved bit 0 bit 3-0: dlc<3:0> : data length code indicates number of data bytes that were received r-x r-x r-x r-x r-x r-x r-x r-x rb n dm7 rb n dm6 rb n dm5 rb n dm4 rb n dm3 rb n dm2 rb n dm1 rb n dm0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: rb n dm7:rb n dm0 : receive buffer n data field byte m eight bytes containing the data bytes for the received message
? 2000 microchip technology inc. preliminary ds21291c-page 29 MCP2510 4.5 message acceptance filters and masks the message acceptance filters and masks are used to determine if a message in the message assembly buffer should be loaded into either of the receive buff- ers (see figure 4-3). once a valid message has been received into the mab, the identifier fields of the mes- sage are compared to the filter values. if there is a match, that message will be loaded into the appropriate receive buffer. the filter masks (see register 4-10 through register 4-17) are used to determine which bits in the identifier are examined with the filters. a truth table is shown below in table 4-10 that indicates how each bit in the identifier is compared to the masks and filters to determine if a the message should be loaded into a receive buffer. the mask essentially determines which bits to apply the acceptance filters to. if any mask bit is set to a zero, then that bit will automatically be accepted regardless of the filter bit. table 4-10: filter/mask truth table as shown in the receive buffers block diagram (figure 4-1), acceptance filters rxf0 and rxf1, and filter mask rxm0 are associated with rxb0. filters rxf2, rxf3, rxf4, and rxf5 and mask rxm1 are associated with rxb1. when a filter matches and a message is loaded into the receive buffer, the filter number that enabled the message reception is loaded into the rxb n ctrl register filhit bit(s). for rxb1 the rxb1ctrl register contains the filhit<2:0> bits. they are coded as follows: - 101 = acceptance filter 5 (rxf5) - 100 = acceptance filter 4 (rxf4) - 011 = acceptance filter 3 (rxf3) - 010 = acceptance filter 2 (rxf2) - 001 = acceptance filter 1 (rxf1) - 000 = acceptance filter 0 (rxf0) rxb0ctrl contains two copies of the bukt bit and the filhit<0> bit. the coding of the bukt bit enables these three bits to be used similarly to the rxb1ctrl.filhit bits and to distinguish a hit on filter rxf0 and rxf1 in either rxb0 or after a roll over into rxb1. - 111 = acceptance filter 1 (rxf1) - 110 = acceptance filter 0 (rxf0) - 001 = acceptance filter 1 (rxf1) - 000 = acceptance filter 0 if the bukt bit is clear, there are six codes correspond- ing to the six filters. if the bukt bit is set, there are six codes corresponding to the six filters plus two addi- tional codes corresponding to rxf0 and rxf1 filters that roll over into rxb1. if more than one acceptance filter matches, the filhit bits will encode the binary value of the lowest num- bered filter that matched. in other words, if filter rxf2 and filter rxf4 match, filhit will be loaded with the value for rxf2. this essentially prioritizes the accep- tance filters with a lower number filter having higher pri- ority. messages are compared to filters in ascending order of filter number. the mask and filter registers can only be modified when the MCP2510 is in configuration mode (see section 9.0). mask bit n filter bit n message identifier bit n001 accept or reject bit n 0x xaccept 10 0accept 10 1reject 11 0reject 11 1accept note: x = don ? t care note: 000 and 001 can only occur if the bukt bit (see table 4-1) is set in the rxb0ctrl register allowing rxb0 messages to roll over into rxb1.
MCP2510 ds21291c-page 30 preliminary ? 2000 microchip technology inc. figure 4-3: message acceptance mask and filter operation register 4-10: rxf n sidh - acceptance filter n standard identifier high (address: 00h, 04h, 08h, 10h, 14h, 18h) acceptance filter register acceptance mask register rxrqst message assembly buffer rxfn 0 rxfn 1 rxfn n rxmn 0 rxmn 1 rxmn n identifier r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: sid<10:3> : standard identifier filter bits <10:3> these bits hold the filter bits to be applied to bits <10:3> of the standard identifier portion of a received message
? 2000 microchip technology inc. preliminary ds21291c-page 31 MCP2510 register 4-11: rxf n sidl - acceptance filter n standard identifier low (address: 01h, 05h, 09h, 11h, 15h, 19h) register 4-12: rxf n eid8 - acceptance filter n extended identifier high (address: 02h, 06h, 0ah, 12h, 16h, 1ah) register 4-13: rxf n eid0 - acceptance filter n extended identifier low (address: 03h, 07h, 0bh, 13h, 17h, 1bh) r/w-x r/w-x r/w-x u-0 r/w-x u-0 r/w-x r/w-x sid2 sid1 sid0 ? exide ? eid17 eid16 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-5: sid<2:0> : standard identifier filter bits <2:0> these bits hold the filter bits to be applied to bits <2:0> of the standard identifier portion of a received message bit 4: unimplemented : reads as ? 0 ? bit 3: exide : extended identifier enable 1 = filter is applied only to extended frames 0 = filter is applied only to standard frames bit 2: unimplemented : reads as ? 0 ? bit 1-0: eid<17:16> : exended identifier filter bits <17:16> these bits hold the filter bits to be applied to bits <17:16> of the extended identifier portion of a received message r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<15:8> : extended identifier filter bits <15:8> these bits hold the filter bits to be applied to bits <15:8> of the extended identifier portion of a received message r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<7:0> : extended identifier filter bits <7:0> these bits hold the filter bits to be applied to the bits <7:0> of the extended identifier portion of a received message
MCP2510 ds21291c-page 32 preliminary ? 2000 microchip technology inc. register 4-14: rxm n sidh - acceptance filter mask n standard identifier high (address: 20h, 24h) register 4-15: rxm n sidl - acceptance filter mask n standard identifier low (address: 21h, 25h) register 4-16: rxm n eid8 - acceptance filter mask n extended identifier high (address: 22h, 26h) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x sid10 sid9 sid8 sid7 sid6 sid5 sid4 sid3 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: sid<10:3> : standard identifier mask bits <10:3> these bits hold the mask bits to be applied to bits <10:3> of the standard identifier portion of a received message r/w-x r/w-x r/w-x u-0 u-0 u-0 r/w-x r/w-x sid2 sid1 sid0 ? ? ? eid17 eid16 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-5: sid<2:0> : standard identifier mask bits <2:0> these bits hold the mask bits to be applied to bits<2:0> of the standard identifier portion of a received message bit 4-2: unimplemented : reads as ? 0 ? bit 1-0: eid<17:16> : extended identifier mask bits <17:16> these bits hold the mask bits to be applied to bits <17:16> of the extended identifier portion of a received message r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid15 eid14 eid13 eid12 eid11 eid10 eid9 eid8 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<15:8> : extended identifier mask bits <15:8> these bits hold the mask bits to be applied to bits <15:8> of the extended identifier portion of a received message
? 2000 microchip technology inc. preliminary ds21291c-page 33 MCP2510 register 4-17: rxm n eid0 - acceptance filter mask n extended identifier low (address: 23h, 27h) r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x r/w-x eid7 eid6 eid5 eid4 eid3 eid2 eid1 eid0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: eid<7:0> : extended identifier mask bits <7:0> these bits hold the mask bits to be applied to bits <7:0> of the extended identifier portion of a received message
MCP2510 ds21291c-page 34 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 35 MCP2510 5.0 bit timing all nodes on a given can bus must have the same nominal bit rate. the can protocol uses non return to zero (nrz) coding which does not encode a clock within the data stream. therefore, the receive clock must be recovered by the receiving nodes and syn- chronized to the transmitters clock. as oscillators and transmission time may vary from node to node, the receiver must have some type of phase lock loop (pll) synchronized to data transmis- sion edges to synchronize and maintain the receiver clock. since the data is nrz coded, it is necessary to include bit stuffing to ensure that an edge occurs at least every six bit times, to maintain the digital phase lock loop (dpll) synchronization. the bit timing of the MCP2510 is implemented using a dpll that is configured to synchronize to the incoming data, and provide the nominal timing for the transmitted data. the dpll breaks each bit time into multiple seg- ments made up of minimal periods of time called the time quanta (t q ). bus timing functions executed within the bit time frame, such as synchronization to the local oscillator, network transmission delay compensation, and sample point positioning, are defined by the programmable bit timing logic of the dpll. all devices on the can bus must use the same bit rate. however, all devices are not required to have the same master oscillator clock frequency. for the different clock frequencies of the individual devices, the bit rate has to be adjusted by appropriately setting the baud rate prescaler and number of time quanta in each seg- ment. the nominal bit rate is the number of bits transmitted per second assuming an ideal transmitter with an ideal oscillator, in the absence of resynchronization. the nominal bit rate is defined to be a maximum of 1mb/s. nominal bit time is defined as: t bit = 1 / nomlnal blt rate the nominal bit time can be thought of as being divided into separate non-overlapping time segments. these segments are shown in figure 5-1. - synchronization segment (sync_seg) - propagation time segment (prop_seg) - phase buffer segment 1 (phase_seg1) - phase buffer segment 2 [phase_seg2) nominal bit time = t q * (sync_seg + prop_seg + phase_seg1 + phase_seg2) the time segments and also the nominal bit time are made up of integer units of time called time quanta or t q (see figure 5-1). by definition, the nominal bit time is programmable from a minimum of 8 t q to a maxi- mum of 25 t q . also, by definition the minimum nominal bit time is 1 s, corresponding to a maximum 1 mb/s rate. figure 5-1: bit time partitioning input signal sync prop segment phase segment 1 phase segment 2 sample point t q
MCP2510 ds21291c-page 36 preliminary ? 2000 microchip technology inc. 5.1 time quanta the time quanta is a fixed unit of time derived from the oscillator period. there is a programmable baud-rate prescaler, with integral values ranging from 1 to 64, in addition to a fixed divide by two for clock generation. time quanta is defined as: t q = 2 * (baud rate +1) * t osc where baud rate is the binary value represented by cnf1.brp<5:0> for some examples: if fosc = 16 mhz, brp<5:0> = 00h, and nominal bit time = 8 t q ; then t q = 125 nsec and nominal bit rate = 1 mb/s if f osc = 20 mhz, brp<5:0> = 01h, and nominal bit time = 8 t q ; then t q = 200nsec and nominal bit rate = 625 kb/s if fosc = 25 mhz, brp<5:0> = 3fh, and nominal bit time = 25 t q ; then t q = 5.12 usec and nominal bit rate = 7.8 kb/s the frequencies of the oscillators in the different nodes must be coordinated in order to provide a system-wide specified nominal bit time. this means that all oscilla- tors must have a t osc that is a integral divisor of t q . it should also be noted that although the number of t q is programmable from 4 to 25, the usable minimum is 6 t q. attempting to a bit time of less than 6 t q in length is not guaranteed to operate correctly 5.2 synchronization segment this part of the bit time is used to synchronize the var- ious can nodes on the bus. the edge of the input sig- nal is expected to occur during the sync segment. the duration is 1 t q . 5.3 propagation segment this part of the bit time is used to compensate for phys- ical delay times within the network. these delay times consist of the signal propagation time on the bus line and the internal delay time of the nodes. the delay is calculated as being the round trip time from transmitter to receiver (twice the signal ? s propagation time on the bus line), the input comparator delay, and the output driver delay. the length of the propagation segment can be programmed from 1 t q to 8 t q by setting the prseg2:prseg0 bits of the cnf2 register (table 6-2). the total delay is calculated from the following individ- ual delays: - 2 * physical bus end to end delay; t bus - 2 * input comparator delay; t comp (depends on application circuit) - 2 * output driver delay; t drive (depends on application circuit) - 1 * input to output of can controller; t can (maximum defined as 1 t q + delay ns) -t propogation = 2 * (t bus + t comp + t drive ) + t can - prop_seg = t propogation / t q 5.4 phase buffer segments the phase buffer segments are used to optimally locate the sampling point of the received bit within the nominal bit time. the sampling point occurs between phase seg- ment 1 and phase segment 2. these segments can be lengthened or shortened by the resynchronization pro- cess (see section 5.7.2). thus, the variation of the val- ues of the phase buffer segments represent the dpll functionality. the end of phase segment 1 determines the sampling point within a bit time. phase segment 1 is programmable from 1 t q to 8 t q in duration. phase seg- ment 2 provides delay before the next transmitted data transition and is also programmable from 1 t q to 8 t q in duration (however due to ipt requirements the actual minimum length of phase segment 2 is 2 t q - see sec- tion 5.6 below), or it may be defined to be equal to the greater of phase segment 1 or the information process- ing time (ipt). (see section 5.6). 5.5 sample point the sample point is the point of time at which the bus level is read and value of the received bit is determined. the sampling point occurs at the end of phase seg- ment 1. if the bit timing is slow and contains many t q , it is possible to specify multiple sampling of the bus line at the sample point. the value of the received bit is determined to be the value of the majority decision of three values. the three samples are taken at the sam- ple point, and twice before with a time of t q /2 between each sample. 5.6 information processing time the information processing time (ipt) is the time seg- ment, starting at the sample point, that is reserved for calculation of the subsequent bit level. the can speci- fication defines this time to be less than or equal to 2 t q . the MCP2510 defines this time to be 2 t q . thus, phase segment 2 must be at least 2 t q long.
? 2000 microchip technology inc. preliminary ds21291c-page 37 MCP2510 5.7 synchronization to compensate for phase shifts between the oscillator frequencies of each of the nodes on the bus, each can controller must be able to synchronize to the relevant signal edge of the incoming signal. synchronization is the process by which the dpll function is imple- mented. when an edge in the transmitted data is detected, the logic will compare the location of the edge to the expected time (sync seg). the circuit will then adjust the values of phase segment 1 and phase seg- ment 2 as necessary. there are two mechanisms used for synchronization. 5.7.1 hard synchronization hard synchronization is only done when there is a recessive to dominant edge during a bus idle condi- tion, indicating the start of a message. after hard syn- chronization, the bit time counters are restarted with sync seg. hard synchronization forces the edge which has occurred to lie within the synchronization segment of the restarted bit time. due to the rules of synchroni- zation, if a hard synchronization occurs there will not be a resynchronization within that bit time. 5.7.2 resynchronization as a result of resynchronization, phase segment 1 may be lengthened or phase segment 2 may be short- ened. the amount of lengthening or shortening of the phase buffer segments has an upper bound given by the synchronization jump width (sjw). the value of the sjw will be added to phase segment 1 (see figure 5-2) or subtracted from phase segment 2 (see figure 5-3). the sjw represents the loop filtering of the dpll. the sjw is programmable between 1 t q and 4 t q . clocking information will only be derived from reces- sive to dominant transitions. the property that only a fixed maximum number of successive bits have the same value ensures resynchronization to the bit stream during a frame. the phase error of an edge is given by the position of the edge relative to sync seg, measured in t q . the phase error is defined in magnitude of t q as follows:  e = 0 if the edge lies within synceseg.  e > 0 if the edge lies before the sample point.  e < 0 if the edge lies after the sample point of the previous bit. if the magnitude of the phase error is less than or equal to the programmed value of the synchronization jump width, the effect of a resynchronization is the same as that of a hard synchronization. if the magnitude of the phase error is larger than the synchronization jump width, and if the phase error is positive, then phase segment 1 is lengthened by an amount equal to the synchronization jump width. if the magnitude of the phase error is larger than the resynchronization jump width, and if the phase error is negative, then phase segment 2 is shortened by an amount equal to the synchronization jump width. 5.7.3 synchronization rules  only one synchronization within one bit time is allowed.  an edge will be used for synchronization only if the value detected at the previous sample point (previously read bus value) differs from the bus value immediately after the edge.  all other recessive to dominant edges fulfilling rules 1 and 2 will be used for resynchronization with the exception that a node transmitting a dom- inant bit will not perform a resynchronization as a result of a recessive to dominant edge with a pos- itive phase error. figure 5-2: lengthening a bit period input signal sync prop segment phase segment 1 phase segment 2 sjw sample nominal actual bit length bit length poin t t q
MCP2510 ds21291c-page 38 preliminary ? 2000 microchip technology inc. figure 5-3: shortening a bit period 5.8 programming time segments some requirements for programming of the time seg- ments:  prop seg + phase seg 1 >= phase seg 2  prop seg + phase seg 1 >= t delay  phase seg 2 > sync jump width for example, assuming that a 125 khz can baud rate with f osc = 20 mhz is desired: t osc = 50 nsec, choose brp<5:0> = 04h, then t q = 500nsec. to obtain 125 khz, the bit time must be 16 t q . typically, the sampling of the bit should take place at about 60-70% of the bit time, depending on the system parameters. also, typically, the t delay is 1-2 t q . sync seg = 1 t q ; prop seg = 2 t q ; so setting phase seg 1 = 7 t q would place the sample at 10 t q after the transition. this would leave 6 t q for phase seg 2. since phase seg 2 is 6, by the rules, sjw could be the maximum of 4 t q . however, normally a large sjw is only necessary when the clock generation of the differ- ent nodes is inaccurate or unstable, such as using ceramic resonators. so an sjw of 1 is typically enough. 5.9 oscillator tolerance the bit timing requirements allow ceramic resonators to be used in applications with transmission rates of up to 125 kbit/sec, as a rule of thumb. for the full bus speed range of the can protocol, a quartz oscillator is required. a maximum node-to-node oscillator variation of 1.7% is allowed. input signal sync prop segment phase segment 1 phase segment 2 sjw sample actual nominal bit length t q point bit length
? 2000 microchip technology inc. preliminary ds21291c-page 39 MCP2510 5.10 bit timing configuration registers the configuration registers (cnf1, cnf2, cnf3) con- trol the bit timing for the can bus interface. these reg- isters can only be modified when the MCP2510 is in configuration mode (see section 9.0). 5.10.1 cnf1 the brp<5:0> bits control the baud rate prescaler. these bits set the length of t q relative to the osc1 input frequency, with the minimum length of t q being 2 osc1 clock cycles in length (when brp<5:0> are set to 000000). the sjw<1:0> bits select the synchroniza- tion jump width in terms of number of t q ? s. 5.10.2 cnf2 the prseg<2:0> bits set the length, in t q ? s, of the propagation segment. the phseg1<2:0> bits set the length, in t q ? s, of phase segment 1. the sam bit con- trols how many times the rxcan pin is sampled. set- ting this bit to a ? 1 ? causes the bus to be sampled three times; twice at t q /2 before the sample point, and once at the normal sample point (which is at the end of phase segment 1). the value of the bus is determined to be the value read during at least two of the samples. if the sam bit is set to a ? 0 ? then the rxcan pin is sampled only once at the sample point. the btlmode bit con- trols how the length of phase segment 2 is determined. if this bit is set to a ? 1 ? then the length of phase segment 2 is determined by the phseg2<2:0> bits of cnf3 (see section 5.10.3). if the btlmode bit is set to a ? 0 ? then the length of phase segment 2 is the greater of phase segment 1 and the information processing time (which is fixed at 2 t q for the MCP2510). 5.10.3 cnf3 the phseg2<2:0> bits set the length, in t q ? s, of phase segment 2, if the cnf2.btlmode bit is set to a ? 1 ? . if the btlmode bit is set to a ? 0 ? then the phseg2<2:0> bits have no effect. register 5-1: cnf1 - configuration register1 (address: 2ah) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-6: sjw<1:0> : synchronization jump width length 11 = length = 4 x t q 10 = length = 3 x t q 01 = length = 2 x t q 00 = length = 1 x t q bit 5-0: brp<5:0> : baud rate prescaler 111111 = t q = 2 x 64 x 1/f osc - - - 000000 = t q = 2 x 1 x 1/f osc
MCP2510 ds21291c-page 40 preliminary ? 2000 microchip technology inc. register 5-2: cnf2 - configuration register2 (address: 29h) register 5-3: cnf3 - configuration register 3 (address: 28h) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 btlmode sam phseg12 phseg11 phseg10 prseg2 prseg1 prseg0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: btlmode : phase segment 2 bit time length 1 = length of phase seg 2 determined by phseg22:phseg20 bits of cnf3 0 = length of phase seg 2 is the greater of phase seg 1 and ipt (2t q ) bit 6: sam : sample point configuration 1 = bus line is sampled three times at the sample point 0 = bus line is sampled once at the sample point bit 5-3: phseg1<2:0> : phase segment 1 length 111 = length = 8 x t q - - - 000 = length = 1 x t q bit 2-0 prseg<2:0> : propagation segment length 111 = length = 8 x t q - - - 000 = length = 1 x t q u-0 r/w-0 u-0 u-0 u-0 r/w-0 r/w-0 r/w-0 ? wakfil ? ? ? phseg22 phseg21 phseg20 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: unimplemented : reads as ? 0 ? bit 6: wakfil : 0 = wake-up filter disabled 1 = wake-up filter enabled bit 5-3: unimplemented : reads as ? 0 ? bit 2-0 phseg2<2:0> : phase segment 2 length 111 = length = 8 x t q - - - bit 000 = length = 1 x t q note: minimum valid setting for phase segment 2 is 2tq
? 2000 microchip technology inc. preliminary ds21291c-page 41 MCP2510 6.0 error detection the can protocol provides sophisticated error detec- tion mechanisms. the following errors can be detected. 6.1 crc error with the cyclic redundancy check (crc), the trans- mitter calculates special check bits for the bit sequence from the start of a frame until the end of the data field. this crc sequence is transmitted in the crc field. the receiving node also calculates the crc sequence using the same formula and performs a comparison to the received sequence. if a mismatch is detected, a crc error has occurred and an error frame is gener- ated. the message is repeated. 6.2 acknowledge error in the acknowledge field of a message, the transmitter checks if the acknowledge slot (which has sent out as a recessive bit) contains a dominant bit. if not, no other node has received the frame correctly. an acknowl- edge error has occurred; an error frame is generated; and the message will have to be repeated. 6.3 form error lf a node detects a dominant bit in one of the four seg- ments including end of frame, interframe space, acknowledge delimiter or crc delimiter; then a form error has occurred and an error frame is generated. the message is repeated. 6.4 bit error a bit error occurs if a transmitter sends a dominant bit and detects a recessive bit or if it sends a recessive bit and detects a dominant bit when monitoring the actual bus level and comparing it to the just transmitted bit. in the case where the transmitter sends a recessive bit and a dominant bit is detected during the arbitration field and the acknowledge slot, no bit error is generated because normal arbitration is occurring. 6.5 stuff error lf, between the start of frame and the crc delimiter, six consecutive bits with the same polarity are detected, the bit stuffing rule has been violated. a stuff error occurs and an error frame is generated. the message is repeated. 6.6 error states detected errors are made public to all other nodes via error frames. the transmission of the erroneous mes- sage is aborted and the frame is repeated as soon as possible. furthermore, each can node is in one of the three error states ? error-active ? , ? error-passive ? or ? bus-off ? according to the value of the internal error counters. the error-active state is the usual state where the bus node can transmit messages and active error frames (made of dominant bits) without any restrictions. in the error-passive state, messages and passive error frames (made of recessive bits) may be transmitted. the bus-off state makes it temporarily impossible for the station to participate in the bus com- munication. during this state, messages can neither be received nor transmitted. 6.7 error modes and error counters the MCP2510 contains two error counters: the receive error counter (rec) (see register 6-2), and the transmit error counter (tec) (see register 6-1). the values of both counters can be read by the mcu. these counters are incremented or decremented in accordance with the can bus specification. the MCP2510 is error-active if both error counters are below the error-passive limit of 128. it is error-passive if at least one of the error counters equals or exceeds 128. it goes to bus-off if the transmit error counter equals or exceeds the bus-off limit of 256. the device remains in this state, until the bus-off recovery sequence is received. the bus-off recovery sequence consists of 128 occurrences and 11 consecutive reces- sive bits (see figure 6-1). note that the MCP2510, after going bus-off, will recover back to error-active, without any intervention by the mcu, if the bus remains idle for 128 x 11 bit times. if this is not desired, the error inter- rupt service routine should address this. the current error mode of the MCP2510 can be read by the mcu via the eflg register (register 6-3). additionally, there is an error state warning flag bit, eflg:ewarn, which is set if at least one of the error counters equals or exceeds the error warning limit of 96. ewarn is reset if both error counters are less than the error warning limit.
MCP2510 ds21291c-page 42 preliminary ? 2000 microchip technology inc. figure 6-1: error modes state diagram register 6-1: tec - transmitter error counter (address: 1ch) register 6-2: rec - receiver error counter (address: 1dh) bus-off error-active error-passive rec > 127 or tec > 127 rec < 127 or tec < 127 tec > 255 reset 128 occurrences of 11 consecutive ? recessive ? bits r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 tec7 tec6 tec5 tec4 tec3 tec2 tec1 tec0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: tec<7:0> : transmit error count r-0 r-0 r-0 r-0 r-0 r-0 r-0 r-0 rec7 rec6 rec5 rec4 rec3 rec2 rec1 rec0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-0: rec<7:0> : receive error count
? 2000 microchip technology inc. preliminary ds21291c-page 43 MCP2510 register 6-3: eflg - error flag register (address: 2dh) r/w-0 r/w-0 r-0 r-0 r-0 r-0 r-0 r-0 rx1ovr rx0ovr txbo txep rxep txwar rxwar ewarn r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: rx1ovr : receive buffer 1 overflow flag - set when a valid message is received for rxb1 and canintf.rx1if = 1 - must be reset by mcu bit 6: rx0ovr : receive buffer 0 overflow flag - set when a valid message is received for rxb0 and canintf.rx0if = 1 - must be reset by mcu bit 5: txbo : bus-off error flag - bit set when tec reaches 255 - reset after a successful bus recovery sequence bit 4: txep : transmit error-passive flag - set when tec is equal to or greater than 128 - reset when tec is less than 128 bit 3: rxep : receive error-passive flag - set when rec is equal to or greater than 128 - reset when rec is less than 128 bit 2: txwar : transmit error warning flag - set when tec is equal to or greater than 96 - reset when tec is less than 96 bit 1: rxwar : receive error warning flag - set when rec is equal to or greater than 96 - reset when rec is less than 96 bit 0: ewarn : error warning flag - set when tec or rec is equal to or greater than 96 (txwar or rxwar = 1) - reset when both rec and tec are less than 96
MCP2510 ds21291c-page 44 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 45 MCP2510 7.0 interrupts the device has eight sources of interrupts. the caninte register contains the individual interrupt enable bits for each interrupt source. the canintf register contains the corresponding interrupt flag bit for each interrupt source. when an interrupt occurs the int pin is driven low by the MCP2510 and will remain low until the interrupt is cleared by the mcu. an interrupt can not be cleared if the respec- tive condition still prevails. it is recommended that the bit modify command be used to reset flag bits in the canintf register rather than normal write operations. this is to prevent unin- tentionally changing a flag that changes during the write command, potentially causing an interrupt to be missed. it should be noted that the canintf flags are read/ write and an interrupt can be generated by the mcu setting any of these bits, provided the associated can- inte bit is also set. 7.1 interrupt code bits the source of a pending interrupt is indicated in the canstat.icod (interrupt code) bits as indicated in register 9-2. in the event that multiple interrupts occur, the int will remain low until all interrupts have been reset by the mcu, and the canstat.icod bits will reflect the code for the highest priority interrupt that is currently pending. interrupts are internally prioritized such that the lower the icod value the higher the inter- rupt priority. once the highest priority interrupt condi- tion has been cleared, the code for the next highest priority interrupt that is pending (if any) will be reflected by the icod bits (see table 7-1). note that only those interrupt sources that have their associated caninte enable bit set will be reflected in the icod bits. table 7-1: icod<2:0> decode 7.2 transmit interrupt when the transmit interrupt is enabled (caninte.tx n ie = 1) an interrupt will be generated on the int pin when the associated transmit buffer becomes empty and is ready to be loaded with a new message. the canintf.tx n if bit will be set to indicate the source of the interrupt. the interrupt is cleared by the mcu resetting the tx n if bit to a ? 0 ? . 7.3 receive interrupt when the receive interrupt is enabled (can- inte.rx n ie = 1) an interrupt will be generated on the int pin when a message has been successfully received and loaded into the associated receive buffer. this interrupt is activated immediately after receiving the eof field. the canintf.rx n if bit will be set to indicate the source of the interrupt. the interrupt is cleared by the mcu resetting the rx n if bit to a ? 0 ? . 7.4 message error interrupt when an error occurs during transmission or reception of a message the message error flag (canintf.merrf) will be set and, if the caninte.merre bit is set, an inter- rupt will be generated on the int pin. this is intended to be used to facilitate baud rate determination when used in conjunction with listen-only mode. 7.5 bus activity wakeup interrupt when the MCP2510 is in sleep mode and the bus activ- ity wakeup interrupt is enabled (caninte.wakie = 1), an interrupt will be generated on the int pin, and the canintf.wakif bit will be set when activity is detected on the can bus. this interrupt causes the MCP2510 to exit sleep mode. the interrupt is reset by the mcu clearing the wakif bit. icod<2:0> boolean expression 000 err  wak  tx0  tx1  tx2  rx0  rx1 001 err 010 err  wak 011 err  wak  tx0 100 err  wak  tx0  tx1 101 err  wak  tx0  tx1  tx2 110 err  wak  tx0  tx1  tx2  rx0 111 err  wak  tx0  tx1  tx2  rx0  rx1
MCP2510 ds21291c-page 46 preliminary ? 2000 microchip technology inc. 7.6 error interrupt when the error interrupt is enabled (caninte.errie = 1) an interrupt is generated on the int pin if an over- flow condition occurs or if the error state of transmitter or receiver has changed. the error flag register (eflg) will indicate one of the following conditions. 7.6.1 receiver overflow an overflow condition occurs when the mab has assem- bled a valid received message (the message meets the criteria of the acceptance filters) and the receive buffer associated with the filter is not available for loading of a new message. the associated eflg.rx n ovr bit will be set to indicate the overflow condition. this bit must be cleared by the mcu. 7.6.2 receiver warning the receive error counter has reached the mcu warn- ing limit of 96. 7.6.3 transmitter warning the transmit error counter has reached the mcu warn- ing limit of 96. 7.6.4 receiver error-passive the receive error counter has exceeded the error- pas- sive limit of 127 and the device has gone to error- pas- sive state. 7.6.5 transmitter error-passive the transmit error counter has exceeded the error- passive limit of 127 and the device has gone to error- passive state. 7.6.6 bus-off the transmit error counter has exceeded 255 and the device has gone to bus-off state. 7.7 interrupt acknowledge interrupts are directly associated with one or more sta- tus flags in the canintf register. interrupts are pend- ing as long as one of the flags is set. once an interrupt flag is set by the device, the flag can not be reset by the mcu until the interrupt condition is removed. register 7-1: caninte - interrupt enable register (address: 2bh) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 merre wakie errie tx2ie tx1ie tx0ie rx1ie rx0ie r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: merre : message error interrupt enable 0 = disabled 1 = interrupt on error during message reception or transmission bit 6: wakie : wakeup interrupt enable 0 = disabled 1 = interrupt on can bus activity bit 5: errie : error interrupt enable (multiple sources in eflg register) 0 = disabled 1 = interrupt on eflg error condition change bit 4: tx2ie : transmit buffer 2 empty interrupt enable 0 = disabled 1 = interrupt on txb2 becoming empty bit 3: tx1ie : transmit buffer 1 empty interrupt enable 0 = disabled 1 = interrupt on txb1 becoming empty bit 2: tx0ie : transmit buffer 0 empty interrupt enable 0 = disabled 1 = interrupt on txb0 becoming empty bit 1: rx1ie : receive buffer 1 full interrupt enable 0 = disabled 1 = interrupt when message received in rxb1 bit 0: rx0ie : receive buffer 0 full interrupt enable 0 = disabled 1 = interrupt when message received in rxb0
? 2000 microchip technology inc. preliminary ds21291c-page 47 MCP2510 register 7-2: canintf - interrupt flag register (address: 2ch) r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 r/w-0 merrf wakif errif tx2if tx1if tx0if rx1if rx0if r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7: merrf : message error interrupt flag bit 6: wakif : wakeup interrupt flag bit 5: errif : error interrupt flag (multiple sources in eflg register) bit 4: tx2if : transmit buffer 2 empty interrupt flag bit 3: tx1if : transmit buffer 1 empty interrupt flag bit 2: tx0if : transmit buffer 0 empty interrupt flag bit 1: rx1if : receive buffer 1 full interrupt flag bit 0: rx0if : receive buffer 0 full interrupt flag for all bits unless otherwise specified: 0 = no interrupt pending 1 = interrupt pending (must be cleared by mcu to reset interrupt condition)
MCP2510 ds21291c-page 48 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 49 MCP2510 8.0 oscillator the MCP2510 is designed to be operated with a crystal or ceramic resonator connected to the osc1 and osc2 pins. the MCP2510 oscillator design requires the use of a parallel cut crystal. use of a series cut crys- tal may give a frequency out of the crystal manufactur- ers specifications. a typical oscillator circuit is shown in figure 8-1. the MCP2510 may also be driven by an external clock source connected to the osc1 pin as shown in figure 8-2 and figure 8-3. 8.1 oscillator startup timer the MCP2510 utilizes an oscillator startup timer (ost), which holds the MCP2510 in reset, to insure that the oscillator has stabilized before the internal state machine begins to operate. the ost maintains reset for the first 128 osc1 clock cycles after power up or wake up from sleep mode occurs. it should be noted that no spi operations should be attempted until after the ost has expired. 8.2 clkout pin the clock out pin is provided to the system designer for use as the main system clock or as a clock input for other devices in the system. the clkout has an internal prescaler which can divide f osc by 1, 2, 4 and 8. the clkout function is enabled and the prescaler is selected via the cancntrl register (see register 9-1). the clkout pin will be active upon system reset and default to the slowest speed (divide by 8) so that it can be used as the mcu clock. when sleep mode is requested, the MCP2510 will drive sixteen additional clock cycles on the clkout pin before entering sleep mode. the idle state of the clkout pin in sleep mode is low. when the clkout function is disabled (cancntrl.clken = ? 0 ? ) the clkout pin is in a high impedance state. the clkout function is designed to guarantee that t hclkout and t lclkout timings are preserved when the clkout pin function is enabled, disabled, or the pres- caler value is changed. figure 8-1: crystal/ceramic resonator operation figure 8-2: external clock source c1 c2 xtal osc2 r s (1) osc1 r f (2) sleep to internal logic note 1: a series resistor, r s , may be required for at strip cut crystals. note 2: the feedback resistor, r f , is typically in the range of 2 to 10 m ?. clock from external system osc1 osc2 open (1) note 1: a resistor to ground may be used to reduce system noise. this may increase system current. note 2: duty cycle restrictions must be observed (see table 12-2).
MCP2510 ds21291c-page 50 preliminary ? 2000 microchip technology inc. figure 8-3: external series resonant crystal oscillator circuit 330 k ? 74as04 74as04 MCP2510 osc1 to other devices xtal 330 k ? 74as04 0.1 mf note 1: duty cycle restrictions must be observed (see table 12-2).
? 2000 microchip technology inc. preliminary ds21291c-page 51 MCP2510 9.0 modes of operation the MCP2510 has five modes of operation. these modes are: 1. configuration mode. 2. normal mode. 3. sleep mode. 4. listen-only mode. 5. loopback mode. the operational mode is selected via the canctrl. reqop bits (see register 9-1). when changing modes, the mode will not actually change until all pending mes- sage transmissions are complete. because of this, the user must verify that the device has actually changed into the requested mode before further operations are executed. verification of the current operating mode is done by reading the canstat. opmode bits (see register 9-2). 9.1 configuration mode the MCP2510 must be initialized before activation. this is only possible if the device is in the configuration mode. configuration mode is automatically selected after pow- erup or a reset, or can be entered from any other mode by setting the cantrl.reqop bits to ? 100 ? . when con- figuration mode is entered all error counters are cleared. configuration mode is the only mode where the follow- ing registers are modifiable:  cnf1, cnf2, cnf3  txrtsctrl  acceptance filter registers  acceptance mask registers only when the canstat.opmode bits read as ? 100 ? can the initialization be performed, allowing the config- uration registers, acceptance mask registers, and the acceptance filter registers to be written. after the con- figuration is complete, the device can be activated by programming the canctrl.reqop bits for normal operation mode (or any other mode). 9.2 sleep mode the MCP2510 has an internal sleep mode that is used to minimize the current consumption of the device. the spi interface remains active even when the MCP2510 is in sleep mode, allowing access to all registers. to enter sleep mode, the mode request bits are set in the canctrl register. the canstat.opmode bits indicate whether the device successfully entered sleep mode. these bits should be read after sending the sleep command to the MCP2510. the MCP2510 is active and has not yet entered sleep mode until these bits indicate that sleep mode has been entered. when in internal sleep mode, the wakeup interrupt is still active (if enabled). this is done so the mcu can also be placed into a sleep mode and use the MCP2510 to wake it up upon detecting activity on the bus. when in sleep mode, the MCP2510 stops its internal oscillator. the MCP2510 will wake-up when bus activity occurs or when the mcu sets, via the spi interface, the canintf.wakif bit to ? generate ? a wake up attempt (the canintf.wakif bit must also be set in order for the wakeup interrupt to occur). the txcan pin will remain in the recessive state while the MCP2510 is in sleep mode. note that sleep mode will be entered immediately, even if a message is currently being transmitted, so it is necessary to insure that all txreq bits are clear before setting sleep mode. 9.2.1 wake-up functions the device will monitor the rxcan pin for activity while it is in sleep mode. if the caninte.wakie bit is set, the device will wake up and generate an interrupt. since the internal oscillator is shut down when sleep mode is entered, it will take some amount of time for the oscilla- tor to start up and the device to enable itself to receive messages. the device will ignore the message that caused the wake-up from sleep mode as well as any messages that occur while the device is ? waking up. ? the device will wake up in listen-only mode. the mcu must set normal mode before the MCP2510 will be able to communicate on the bus. the device can be programmed to apply a low-pass fil- ter function to the rxcan input line while in internal sleep mode. this feature can be used to prevent the device from waking up due to short glitches on the can bus lines. the cnf3.wakfil bit enables or disables the filter. 9.3 listen only mode listen-only mode provides a means for the MCP2510 to receive all messages including messages with errors. this mode can be used for bus monitor applica- tions or for detecting the baud rate in ? hot plugging ? sit- uations. for auto-baud detection it is necessary that there are at least two other nodes, which are communi- cating with each other. the baud rate can be detected empirically by testing different values until valid mes- sages are received. the listen-only mode is a silent mode, meaning no messages will be transmitted while in this state, including error flags or acknowledge sig- nals. the filters and masks can be used to allow only particular messages to be loaded into the receive reg- isters, or the filter masks can be set to all zeros to allow a message with any identifier to pass. the error counters are reset and deactivated in this state. the lis- ten-only mode is activated by setting the mode request bits in the canctrl register. note: care must be exercised to not enter sleep mode while the MCP2510 is transmitting a message. if sleep mode is requested while transmitting, the transmission will stop without completing and errors will occur on the bus. also, the message will remain pending and transmit upon wake up.
MCP2510 ds21291c-page 52 preliminary ? 2000 microchip technology inc. 9.4 loopback mode this mode will allow internal transmission of messages from the transmit buffers to the receive buffers without actually transmitting messages on the can bus. this mode can be used in system development and testing. in this mode the ack bit is ignored and the device will allow incoming messages from itself just as if they were coming from another node. the loopback mode is a silent mode, meaning no messages will be transmitted while in this state, including error flags or acknowledge signals. the txcan pin will be in a reccessive state while the device is in this mode. the filters and masks can be used to allow only particular messages to be loaded into the receive registers. the masks can be set to all zeros to provide a mode that accepts all mes- sages. the loopback mode is activated by setting the mode request bits in the canctrl register. 9.5 normal mode this is the standard operating mode of the MCP2510. in this mode the device actively monitors all bus mes- sages and generates acknowledge bits, error frames, etc. this is also the only mode in which the MCP2510 will transmit messages over the can bus. register 9-1: canctrl - can control register (address: xfh) r/w-1 r/w-1 r/w-1 r/w-0 u-0 r/w-1 r/w-1 r/w-1 reqop2 reqop1 reqop0 abat ? clken clkpre1 clkpre0 r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-5: reqop<2:0> : request operation mode 000 = set normal operation mode 001 = set sleep mode 010 = set loopback mode 011 = set listen only mode 100 = set configuration mode all other values for reqop bits are invalid and should not be used bit 4: abat : abort all pending transmissions 1 = request abort of all pending transmit buffers 0 = terminate request to abort all transmissions bit 3: unimplemented : reads as ? 0 ? bit 2: clken : clkout pin enable 0 = clkout pin disabled (pin is in high impedance state) 1 =clkout pin enabled bit 1-0: clkpre<1:0> : clkout pin prescaler 00 = f clkout = system clock/1 01 = f clkout = system clock/2 10 = f clkout = system clock/4 11 = f clkout = system clock/8
? 2000 microchip technology inc. preliminary ds21291c-page 53 MCP2510 register 9-2: canstat - can status register (address: xeh) r-1 r-0 r-0 u-0 r-0 r-0 r-0 u-0 opmod2 opmod1 opmod0 ? icod2 icod1 icod0 ? r = readable bit w = writable bit c = bit can be cleared by mcu but not set u = unimplemented - reads as ? 0 ? - n = value at por reset bit 7 bit 0 bit 7-5: opmod<2:0> : operation mode 000 = device is in normal operation mode 001 = device is in sleep mode 010 = device is in loopback mode 011 = device is in listen only mode 100 = device is in configuration mode bit 4: unimplemented : reads as ? 0 ? bit 3-1: icod<2:0> : interrupt flag code 000 = no interrupt 001 = error interrupt 010 = wake up interrupt 011 = txb0 interrupt 100 = txb1 interrupt 101 = txb2 interrupt 110 = rxb0 interrupt 111 = rxb1 interrupt bit 0: unimplemented : reads as ? 0 ?
MCP2510 ds21291c-page 54 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 55 MCP2510 10.0 register map the register map for the MCP2510 is shown in table 10-1. address locations for each register are determined by using the column (higher order 4 bits) and row (lower order 4 bits) values. the registers have been arranged to optimize the sequential reading and writing of data. some specific control and status regis- ters allow individual bit modification using the spi bit modify command. the registers that allow this com- mand are shown as shaded locations in table 10-1. a summary of the MCP2510 control registers is shown in table 10-2. table 10-1: can controller register map table 10-2: control register summary lower address bits higher order address bits x000 xxxx x001 xxxx x010 xxxx x0011 xxxx x100 xxxx x101 xxxx x110 xxxx x111 xxxx 0000 rxf0sidh rxf3sidh rxm0sidh txb0ctrl txb1ctrl txb2ctrl rxb0ctrl rxb1ctrl 0001 rxf0sidl rxf3sidl rxm0sidl txb0sidh txb1sidh txb2sidh rxb0sidh rxb1sidh 0010 rxf0eid8 rxf3eid8 rxm0eid8 txb0sidl txb1sidl txb2sidl rxb0sidl rxb1sidl 0011 rxf0eid0 rxf3eid0 rxm0eid0 txb0eid8 txb1eid8 txb2eid8 rxb0eid8 rxb1eid8 0100 rxf1sidh rxf4sidh rxm1sidh txb0eid0 txb1eid0 txb2eid0 rxb0eid0 rxb1eid0 0101 rxf1sidl rxf4sidl rxm1sidl txb0dlc txb1dlc txb2dlc rxb0dlc rxb1dlc 0110 rxf1eid8 rxf4eid8 rxm1eid8 txb0d0 txb1d0 txb2d0 rxb0d0 rxb1d0 0111 rxf1eid0 rxf4eid0 rxm1eid0 txb0d1 txb1d1 txb2d1 rxb0d1 rxb1d1 1000 rxf2sidh rxf5sidh cnf3 txb0d2 txb1d2 txb2d2 rxb0d2 rxb1d2 1001 rxf2sidl rxf5sidl cnf2 txb0d3 txb1d3 txb2d3 rxb0d3 rxb1d3 1010 rxf2eid8 rxf5eid8 cnf1 txb0d4 txb1d4 txb2d4 rxb0d4 rxb1d4 1011 rxf2eid0 rxf5eid0 caninte txb0d5 txb1d5 txb2d5 rxb0d5 rxb1d5 1100 bfpctrl tec canintf txb0d6 txb1d6 txb2d6 rxb0d6 rxb1d6 1101 txrtsctrl rec eflg txb0d7 txb1d7 txb2d7 rxb0d7 rxb1d7 1110 canstat canstat canstat canstat canstat canstat canstat canstat 1111 canctrl canctrl canctrl canctrl canctrl canctrl canctrl canctrl note: shaded register locations indicate that these allow the user to manipulate individual bits using the ? bit modify ? command register name address (hex) bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 por/rst value bfpctrl 0c ?? b1bfs b0bfs b1bfe b0bfe b1bfm b0bfm --00 0000 txrtsctrl 0d ?? b2rts b1rts b0rts b2rtsm b1rtsm b0rtsm --xx x000 canstat xe opmod2 opmod1 opmod0 ? icod2 icod1 icod0 ? 100- 000- canctrl xf reqop2 reqop1 reqop0 abat ? clken clkpre1 clkpre0 1110 -111 tec 1c transmit error counter 0000 0000 rec 1d receive error counter 0000 0000 cnf3 28 ? wakfil ??? phseg22 phseg21 phseg20 -0-- -000 cnf2 29 btlmode sam phseg12 phseg11 phseg10 prseg2 prseg1 prseg0 0000 0000 cnf1 2a sjw1 sjw0 brp5 brp4 brp3 brp2 brp1 brp0 0000 0000 caninte 2b merre wakie errie tx2ie tx1ie tx0ie rx1ie rx0ie 0000 0000 canintf 2c merrf wakif errif tx2if tx1if tx0if rx1if rx0if 0000 0000 eflg 2d rx1ovr rx0ovr txbo txep rxep txwar rxwar ewarn 0000 0000 txb0ctrl 30 ? abtf mloa txerr txreq ? txp1 txp0 -000 0-00 txb1ctrl 40 ? abtf mloa txerr txreq ? txp1 txp0 -000 0-00 txb2ctrl 50 ? abtf mloa txerr txreq ? txp1 txp0 -000 0-00 rxb0ctrl 60 ? rxm1 rxm0 ? rxrtr bukt bukt filhit0 -00- 0000 rxb1ctrl 70 ? rsm1 rxm0 ? rxrtr filhit2 filhit1 filhit0 -00- 0000
MCP2510 ds21291c-page 56 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 57 MCP2510 11.0 spi interface 11.1 overview the MCP2510 is designed to interface directly with the serial peripheral interface (spi) port available on many microcontrollers and supports mode 0,0 and mode 1,1. commands and data are sent to the device via the si pin, with data being clocked in on the rising edge of sck. data is driven out by the MCP2510, on the so line, on the falling edge of sck. the cs pin must be held low while any operation is performed. table 11-1 shows the instruction bytes for all operations. refer to figure 11-8 and figure 11-9 for detailed input and out- put timing diagrams for both mode 0,0 and mode 1,1 operation. 11.2 read instruction the read instruction is started by lowering the cs pin. the read instruction is then sent to the MCP2510 fol- lowed by the 8-bit address (a7 through a0). after the read instruction and address are sent, the data stored in the register at the selected address will be shifted out on the so pin. the internal address pointer is automat- ically incremented to the next address after each byte of data is shifted out. therefore it is possible to read the next consecutive register address by continuing to pro- vide clock pulses. any number of consecutive register locations can be read sequentially using this method. the read operation is terminated by raising the cs pin (figure 11-2). 11.3 write instruction the write instruction is started by lowering the cs pin. the write instruction is then sent to the MCP2510 fol- lowed by the address and at least one byte of data. it is possible to write to sequential registers by continuing to clock in data bytes, as long as cs is held low. data will actually be written to the register on the rising edge of the sck line for the d0 bit. if the cs line is brought high before eight bits are loaded, the write will be aborted for that data byte, previous bytes in the command will have been written. refer to the timing diagram in figure 11-3 for more detailed illustration of the byte write sequence. 11.4 request to send (rts) instruction the rts command can be used to initiate message transmission for one or more of the transmit buffers. the part is selected by lowering the cs pin and the rts command byte is then sent to the MCP2510. as shown in figure 11-4, the last 3 bits of this command indicate which transmit buffer(s) are enabled to send. this com- mand will set the txbnctrl.txreq bit for the respec- tive buffer(s). any or all of the last three bits can be set in a single command. if the rts command is sent with nnn=000, the command will be ignored. 11.5 read status instruction the read status instruction allows single instruction access to some of the often used status bits for mes- sage reception and transmission. the part is selected by lowering the cs pin and the read status command byte, shown in figure 11-6, is sent to the MCP2510. after the command byte is sent, the MCP2510 will return eight bits of data that contain the status. if additional clocks are sent after the first eight bits are transmitted, the MCP2510 will continue to output the status bits as long as the cs pin is held low and clocks are provided on sck. each status bit returned in this command may also be read by using the standard read command with the appropriate register address. 11.6 bit modify instruction the bit modify instruction provides a means for setting or clearing individual bits in specific status and control registers. this command is not available for all regis- ters. see section 10.0 (register map) to determine which registers allow the use of this command. the part is selected by lowering the cs pin and the bit modify command byte is then sent to the MCP2510. after the command byte is sent, the address for the register is sent followed by the mask byte and then the data byte. the mask byte determines which bits in the register will be allowed to change. a ? 1 ? in the mask byte will allow a bit in the register to change and a ? 0 ? will not. the data byte determines what value the modified bits in the register will be changed to. a ? 1 ? in the data byte will set the bit and a ? 0 ? will clear the bit, provided that the mask for that bit is set to a ? 1 ? . (see figure 11-1) 11.7 reset instruction the reset instruction can be used to re-initialize the internal registers of the MCP2510 and set configuration mode. this command provides the same functionality, via the spi interface, as the reset pin. the reset instruction is a single byte instruction which requires selecting the device by pulling cs low, sending the instruction byte, and then raising cs . it is highly recom- mended that the reset command be sent (or the reset pin be lowered) as part of the power-on initial- ization sequence. figure 11-1: bit modify mask byte data byte previous register contents resulting register contents 001 1 11 00 xx1 1 00 xx 010 1 10 00 011 1 00 00
MCP2510 ds21291c-page 58 preliminary ? 2000 microchip technology inc. table 11-1: spi instruction set figure 11-2: read instruction figure 11-3: byte write instruction instruction name instruction format description reset 1100 0000 resets internal registers to default state, set configuration mode read 0000 0011 read data from register beginning at selected address write 0000 0010 write data to register beginning at selected address rts (request to send) 1000 0nnn sets txbnctrl.txreq bit for one or more transmit buffers read status 1010 0000 polling command that outputs status bits for transmit/receive functions bit modify 0000 0101 bit modify selected registers 1000 0nnn request to send for txbo request to send for txb1 request to send for txb2 so si sck cs 0 23456789101112131415161718192021 22 1 01 0 0 0 0 01 a7 6 5 4 1a0 76543210 instruction address byte data out high impedance 23 32 don ? t care so si sck cs 0 23456789101112131415161718192021 22 1 00 0 0 0 0 0a7654 1a0 76543 210 instruction high impedance 23 32 1 address byte data byte
? 2000 microchip technology inc. preliminary ds21291c-page 59 MCP2510 figure 11-4: request to send instruction figure 11-5: bit modify instruction figure 11-6: read status instruction so si sck cs 0 234567 1 t2 t0 0 0 0 0 1 instruction high impedance t1 so si sck cs 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 11 0 0 0 0 0 a7 6 5 4 1 a0 765432 10 instruction high impedance 32 0 address byte mask byte 7 6 543210 23 24 25 26 27 28 29 30 31 data byte note: not all registers can be accessed with this command. see the register map in section 10.0 for a list of the registers that apply. so si sck cs 0 23456789101112131415161718192021 22 1 00 0 0 1 0 10 76543210 instruction data out high impedance 23 don ? t care canintf.rx0if canintf.rx1if canintf.tx0if canintf.tx1if canintf.tx2if txb2cntrl.txreq txb1cntrl.txreq txb0cntrl.txreq 7654321 0 data out repeat
MCP2510 ds21291c-page 60 preliminary ? 2000 microchip technology inc. figure 11-7: reset instruction figure 11-8: spi input timing figure 11-9: spi output timing so si sck cs 0 234567 1 0 0 0 1 1 instruction high impedance 000 cs sck si so t css t hd t su t f t r t csd t cld t csh lsb in msb in high impedance t cle mode 1,1 mode 0,0 cs sck so t lo t hi t ho t v msb out lsb out t csh t dis don ? t care si mode 1,1 mode 0,0
? 2000 microchip technology inc. preliminary ds21291c-page 61 MCP2510 12.0 electrical characteristics 12.1 maximum ratings v dd ...................................................................................7.0v all inputs and outputs w.r.t. v ss ............... -0.6v to v dd +1.0v storage temperature .....................................-65 c to +150 c ambient temp. with power applied ................-65 c to +125 c soldering temperature of leads (10 seconds) ............. +300 c esd protection on all pins .................................................. 4 kv *notice: stresses above those listed under ? maximum rat- ings ? may cause permanent damage to the device. this is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. expo- sure to maximum rating conditions for extended periods may affect device reliability. table 12-1: dc characteristics all parameters apply over the specified operating ranges unless otherwise noted. industrial (i): t amb = -40 c to +85 c v dd = 3.0v to 5.5v automotive (e): t amb = -40 c to +125 c v dd = 4.5v to 5.5v parameter symbol min max units test conditions supply voltage v dd 3.0 5.5 v register retention voltage v ret 2.4 ? v high level input voltage note rxcan v ih 2v dd +1 v sck, cs , si, txnrts pins .7 v dd v dd +1 v osc1 .85 v dd v dd v reset .85 v dd v dd v low level input voltage note rxcan,txnrts pins v il -0.3 .15 v dd v sck, cs , si -0.3 .4 v osc1 v ss .3 v dd v reset v ss .15 v dd v low level output voltage txcan v ol ? 0.4 v i ol = -6.0 ma rxnbf pins ? 0.4 v i ol = -8.5 ma, v dd = 4.5v so, clkout ? 0.4 v i ol = -2.1 ma, v dd = 4.5v int ? 0.6 v i ol = -1.6 ma, v dd = 4.5v high level output voltage v txcan, rxnbf pins v oh v dd -0.7 ? vi oh = 3.0ma, v dd = 4.5v, i temp so, clkout v dd -0.5 ? vi oh = 400a int v dd -0.7 ? vi oh = 1.0ma, v dd = 4.5v hysteresis v hys .05 v dd v input leakage current all i/o except osc1 and txnrts pins i li -1 +1 acs = reset = v dd , v in = v ss to v dd osc1 pin -5 +5 a internal capacitance (all inputs and outputs) c int ? 7pft amb = 25 c, f c = 1.0 mhz, v dd = 5.0v (note) operating current i dd ? 10 ma v dd = 5.5v; f clk =5.0 mhz; so = open standby current (sleep mode) i dds -- 5 acs, txnrts = v dd , inputs tied to v dd or v ss note: this parameter is not 100% tested.
MCP2510 ds21291c-page 62 preliminary ? 2000 microchip technology inc. table 12-2: oscillator timing characteristics table 12-3: can interface ac characteristics table 12-4: clkout pin ac/dc characteristics all parameters apply over the specified operating ranges unless otherwise noted. industrial (i): t amb = -40 c to +85 c v dd = 3.0v to 5.5v automotive (e): t amb = -40 c to +125 c v dd = 4.5v to 5.5v parameter symbol min max units conditions clock in frequency f osc 1 1 25 16 mhz mhz 4.5v to 5.5v 3.0v to 4.5v clock in period t osc 40 62.5 1000 1000 ns ns 4.5v to 5.5v 3.0v to 4.5v clock in high, low time t osl , t osh 10 ? ns note clock in rise, fall time t osr , t osf ? 15 ns note duty cycle (external clock input) t duty .30 .70 ? t osh / (t osh + t osl ) note: this parameter is periodically sampled and not 100% tested. all parameters apply over the specified operating ranges unless otherwise noted. industrial (i): t amb = -40 c to +85 c v dd = 3.0v to 5.5v automotive (e): t amb = -40 c to +125 c v dd = 4.5v to 5.5v parameter symbol min max units conditions wakeup noise filter t wf 50 ? ns clockout propagation delay t dclk ? 100 ns all parameters apply over the specified operating ranges unless otherwise noted. industrial (i): t amb = -40 c to +85 c v cc = 3.0v to 5.5v automotive (e): t amb = -40 c to +125 c v cc = 4.5v to 5.5v parameter symbol min max units conditions clkout pin high time t hclkout 15 ? ns t osc = 40 ns, clkout prescaler set to divide by one clkout pin low time t lclkout 15 ? ns t osc = 40 ns, clkout prescaler set to divide by one clkout pin rise time t rclkout ? 5 ns measured from 0.3 v dd to 0.7 v dd clkout pin fall time t fclkout ? 5 ns measured from 0.7 v dd to 0.3 v dd clockout propagation delay t dclkout ? 100 ns
? 2000 microchip technology inc. preliminary ds21291c-page 63 MCP2510 table 12-5: spi interface ac characteristics all parameters apply over the specified operating ranges unless otherwise noted. industrial (i): t amb = -40 c to +85 c v dd = 3.0v to 5.5v automotive (e): t amb = -40 c to +125 c v dd = 4.5v to 5.5v parameter symbol min max units test conditions clock frequency f clk ? ? ? 5 4 2.5 mhz mhz mhz v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd = 3.0v to 4.5v cs setup time t css 100 ? ns cs hold time t csh 100 115 180 ? ? ? ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd =3.0v to 4.5v cs disable time t csd 100 100 280 ? ? ? ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd = 3.0v to 4.5v data setup time t su 20 20 30 ? ? ? ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd = 3.0v to 4.5v data hold time t hd 20 20 50 ? ? ? ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd = 3.0v to 4.5v clk rise time t r ? 2ms note clk fall time t f ? 2ms note clock high time t hi 90 115 180 ? ? ? ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd = 3.0v to 4.5v clock low time t lo 90 115 180 ? ? ? ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd = 3.0v to 4.5v clock delay time t cld 50 ? ns clock enable time t cle 50 ? ns output valid from clock low t v ? ? ? 90 115 180 ns ns ns v dd = 4.5v to 5.5v v dd = 4.5v to 5.5v (e temp) v dd =3.0v to 4.5v output hold time t ho 0 ? ns note output disable time t dis ? 200 ns note note: this parameter is periodically sampled and not 100% tested.
MCP2510 ds21291c-page 64 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 65 MCP2510 13.0 packaging information 14.1 package marking information not available at the time of printing. will be made available after definition of qs9000 compliant standard. 14.2 package details the following sections give the technical details of the packages.
MCP2510 ds21291c-page 66 preliminary ? 2000 microchip technology inc. package type: 18-lead plastic dual in-line (p) ? 300 mil (pdip) 15 10 5 15 10 5 mold draft angle bottom 15 10 5 15 10 5 mold draft angle top 10.92 9.40 7.87 .430 .370 .310 eb overall row spacing 0.56 0.46 0.36 .022 .018 .014 b lower lead width 1.78 1.46 1.14 .070 .058 .045 b1 upper lead width 0.38 0.29 0.20 .015 .012 .008 c lead thickness 3.43 3.30 3.18 .135 .130 .125 l tip to seating plane 22.99 22.80 22.61 .905 .898 .890 d overall length 6.60 6.35 6.10 .260 .250 .240 e1 molded package width 8.26 7.94 7.62 .325 .313 .300 e shoulder to shoulder width 0.38 .015 a1 base to seating plane 3.68 3.30 2.92 .145 .130 .115 a2 molded package thickness 4.32 3.94 3.56 .170 .155 .140 a top to seating plane 2.54 .100 p pitch 18 18 n number of pins max nom min max nom min dimension limits millimeters inches* units 1 2 d n e1 c eb e p a2 l b1 b a a1 *controlling parameter notes: dimensions d and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed .010 ? (0.254mm) per side. jedec equivalent: ms-001 drawing no. c04-007
? 2000 microchip technology inc. preliminary ds21291c-page 67 MCP2510 package type: 18-lead plastic small outline (so) ? wide, 300 mil (soic) foot angle 048048 15 12 0 15 12 0 mold draft angle bottom 15 12 0 15 12 0 mold draft angle top 0.51 0.42 0.36 .020 .017 .014 b lead width 0.30 0.27 0.23 .012 .011 .009 c lead thickness 1.27 0.84 0.41 .050 .033 .016 l foot length 0.74 0.50 0.25 .029 .020 .010 h chamfer distance 11.73 11.53 11.33 .462 .454 .446 d overall length 7.59 7.49 7.39 .299 .295 .291 e1 molded package width 10.67 10.34 10.01 .420 .407 .394 e overall width 0.30 0.20 0.10 .012 .008 .004 a1 standoff 2.39 2.31 2.24 .094 .091 .088 a2 molded package thickness 2.64 2.50 2.36 .104 .099 .093 a overall height 1.27 .050 p pitch 18 18 n number of pins max nom min max nom min dimension limits millimeters inches* units l c h 45 1 2 d p n b e1 e a2 a1 a *controlling parameter notes: dimensions d and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed .010 ? (0.254mm) per side. jedec equivalent: ms-013 drawing no. c04-051
MCP2510 ds21291c-page 68 preliminary ? 2000 microchip technology inc. package type: 20-lead plastic thin shrink small outline (st) ? 4.4 mm (tssop) foot angle 048048 15 12 0 15 12 0 mold draft angle bottom 15 12 0 15 12 0 mold draft angle top 0.51 0.42 0.36 .020 .017 .014 b lead width 0.30 0.27 0.23 .012 .011 .009 c lead thickness 1.27 0.84 0.41 .050 .033 .016 l foot length 0.74 0.50 0.25 .029 .020 .010 h chamfer distance 11.73 11.53 11.33 .462 .454 .446 d overall length 7.59 7.49 7.39 .299 .295 .291 e1 molded package width 10.67 10.34 10.01 .420 .407 .394 e overall width 0.30 0.20 0.10 .012 .008 .004 a1 standoff 2.39 2.31 2.24 .094 .091 .088 a2 molded package thickness 2.64 2.50 2.36 .104 .099 .093 a overall height 1.27 .050 p pitch 18 18 n number of pins max nom min max nom min dimension limits millimeters inches units l c h 45 1 2 d p n b e1 e a2 a1 a *controlling parameter notes: dimensions d and e1 do not include mold flash or protrusions. mold flash or protrusions shall not exceed .010 ? (0.254mm) per side. jedec equivalent: ms-013 drawing no. c04-051
? 2000 microchip technology inc. preliminary ds21291c-page 69 MCP2510 systems information and upgrade hot line the systems information and upgrade line provides system users a listing of the latest versions of all of microchip ? s development systems software products. plus, this line provides information on how customers can receive any currently available upgrade kits.the hot line numbers are: 1-800-755-2345 for u.s. and most of canada, and 1-480-792-7302 for the rest of the world. trademarks: the microchip name, logo, pic, picmicro, picstart, picmaster, pro mate and mplab are registered trademarks of microchip technology incorpo- rated in the u.s.a. and other countries. flex rom and fuzzy lab are trademarks and sqtp is a service mark of microchip in the u.s.a. all other trademarks mentioned herein are the property of their respective companies. on-line support microchip provides on-line support on the microchip world wide web (www) site. the web site is used by microchip as a means to make files and information easily available to customers. to view the site, the user must have access to the internet and a web browser, such as netscape or microsoft explorer. files are also available for ftp download from our ftp site. connecting to the microchip internet web site the microchip web site is available by using your favorite internet browser to attach to: www.microchip.com the file transfer site is available by using an ftp ser- vice to connect to: ftp://ftp.microchip.com the web site and file transfer site provide a variety of services. users may download files for the latest development tools, data sheets, application notes, user ? s guides, articles and sample programs. a vari- ety of microchip specific business information is also available, including listings of microchip sales offices, distributors and factory representatives. other data available for consideration is:  latest microchip press releases  technical support section with frequently asked questions  design tips  device errata  job postings  microchip consultant program member listing  links to other useful web sites related to microchip products  conferences for products, development systems, technical information and more  listing of seminars and events 990902
MCP2510 ds21291c-page 70 preliminary ? 2000 microchip technology inc. reader response it is our intention to provide you with the best documentation possible to ensure successful use of your microchip prod- uct. if you wish to provide your comments on organization, clarity, subject matter, and ways in which our documentation can better serve you, please fax your comments to the technical publications manager at (480) 792-7578. please list the following information, and use this outline to provide us with your comments about this data sheet. 1. what are the best features of this document? 2. how does this document meet your hardware and software development needs? 3. do you find the organization of this data sheet easy to follow? if not, why? 4. what additions to the data sheet do you think would enhance the structure and subject? 5. what deletions from the data sheet could be made without affecting the overall usefulness? 6. is there any incorrect or misleading information (what and where)? 7. how would you improve this document? 8. how would you improve our software, systems, and silicon products? to : technical publications manager re: reader response total pages sent from: name company address city / state / zip / country telephone: (_______) _________ - _________ application (optional): would you like a reply? y n device: literature number: questions: fax: (______) _________ - _________ ds21291c MCP2510
? 2000 microchip technology inc. preliminary ds21291c-page 71 MCP2510 MCP2510 product identification system to order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office. sales and support MCP2510 - t /p package: p = plastic dip (300 mil body), 18-lead so = plastic soic (300 mil body), 18-lead st = tssop, (4.4 mil), 20-lead temperature i= ? 40 c to +85 c range: e= ? 40 c to +125 c device: MCP2510 = MCP2510t = (tape and reel) 980106 data sheets products supported by a preliminary data sheet may have an errata sheet describing minor operational differences and recom- mended workarounds. to determine if an errata sheet exists for a particular device, please contact one of the following: 1. your local microchip sales office 2. the microchip corporate literature center u.s. fax: (480) 792-7277. 3. the microchip worldwide site (www.microchip.com) please specify which device, revision of silicon and data sheet (include literature #) you are using. new customer notification system register on our web site (www.microchip.com/cn) to receive the most current information on our products.
MCP2510 ds21291c-page 72 preliminary ? 2000 microchip technology inc. notes:
? 2000 microchip technology inc. preliminary ds21291c-page 73 MCP2510 index a acknowledge error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 b bfpctrl - rxnbf pin control and status register . . . . . . . 26 bit error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 bit modify instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 bit modify instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 bit timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 bit timing configuration registers . . . . . . . . . . . . . . . . . . 39 bit timing logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 bus activity wakeup interrupt . . . . . . . . . . . . . . . . . . . . . . 45 bus off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 byte write instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 c can buffers and protocol engine block diagram . . . . . . . . 5 can controller register map . . . . . . . . . . . . . . . . . . . . . . . 55 can interface ac characteristics . . . . . . . . . . . . . . . . . . . 62 can protocol engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 can protocol engine block diagram . . . . . . . . . . . . . . . . . 6 canctrl - can control register . . . . . . . . . . . . . . . . . . 52 caninte - interrupt enable register . . . . . . . . . . . . . . . . 46 canstat - can status register . . . . . . . . . . . . . . . . . . . 53 cnf1 - configuration register1 . . . . . . . . . . . . . . . . . . . . 39 cnf2 - configuration register2 . . . . . . . . . . . . . . . . . . . . 40 cnf3 - configuration register3 . . . . . . . . . . . . . . . . . . . . 40 configuration mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 crc error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 crystal/ceramic resonator operation . . . . . . . . . . . . . . . . . 49 cyclic redundancy check . . . . . . . . . . . . . . . . . . . . . . . . . . 6 d dc characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 device functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 e eflg - error flag register . . . . . . . . . . . . . . . . . . . . . . . . 43 electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 61 errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 error detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 error frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 , 13 error interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 error management logic . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 error modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 error modes and error counters . . . . . . . . . . . . . . . . . . . . 41 error states . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 extended data frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 external clock (osc1) timing characteristics . . . . . . . . . . . 62 external clock source . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 external series resonant crystal oscillator circuit . . . . . . 50 f features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 filter/mask truth table . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 form error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 frame types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 h hard synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 i information processing time . . . . . . . . . . . . . . . . . . . . . . . 36 initiating message transmission . . . . . . . . . . . . . . . . . . . . 15 interframe space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 interrupt acknowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 l lenghtening a bit period . . . . . . . . . . . . . . . . . . . . . . . . . 37 listen only mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 loopback mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 m maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 message acceptance filter . . . . . . . . . . . . . . . . . . . . . . . 30 message acceptance filters and masks . . . . . . . . . . . . . 29 message reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 message reception flowchart . . . . . . . . . . . . . . . . . . . . . 23 message transmission . . . . . . . . . . . . . . . . . . . . . . . . . . 14 modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 n normal mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 o oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 oscillator tolerance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 overload frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 p package types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 packaging information . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 phase buffer segments . . . . . . . . . . . . . . . . . . . . . . . . . . 36 programming time segments . . . . . . . . . . . . . . . . . . . . . 38 propagation segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 protocol finite state machine . . . . . . . . . . . . . . . . . . . . . . 6 r read instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 read instruction diagram . . . . . . . . . . . . . . . . . . . . . . . . . 58 read status instruction . . . . . . . . . . . . . . . . . . . . . . . . . . 57 read status instruction . . . . . . . . . . . . . . . . . . . . . . . . . . 59 rec - receiver error count . . . . . . . . . . . . . . . . . . . . . . . 42 receive buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 receive buffers diagram . . . . . . . . . . . . . . . . . . . . . . . . . 22 receive interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 receive message buffering . . . . . . . . . . . . . . . . . . . . . . . 21 receiver error passive . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 receiver overrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 receiver warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 register map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 remote frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 request to send (rts) instruction . . . . . . . . . . . . . . 57 , 59 resynchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 rxb0bf and rxb1bf pins . . . . . . . . . . . . . . . . . . . . . . . 21 rxb0ctrl - receive buffer 0 control register . . . . . . . 24 rxb1ctrl - receive buffer 1 control register . . . . . . . 25 rxbndlc - receive buffer n data length code . . . . . . . 28 rxbndm - receive buffer n data field byte m . . . . . . . . 28 rxbneid0 - receive buffer n extended identifier low . . 27 rxbneid8 - receive buffer n extended identifier mid . . 27 rxbnsidh - receive buffer n standard identifier high . . 26 rxbnsidl - receive buffer n standard identifier low . . 27 rxfneid0 - acceptance filter n extended identifier low 31 rxfneid8 - acceptance filter n extended identifier mid 31 rxfnsidh - acceptance filter n standard identifier high 30 rxfnsidl - acceptance filter n standard identifier low 31 rxmneid0 - acceptance filter mask n extended identifier low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 rxmneid8 - acceptance filter mask n extended identifier mid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 rxmnsidh - acceptance filter mask n standard identifier high . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
MCP2510 ds21291c-page 74 preliminary ? 2000 microchip technology inc. rxmnsidl - acceptance filter mask n standard identifier low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 s sample point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 shortening a bit period . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 sleep mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 spi interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 spi interface overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 spi port ac characteristics . . . . . . . . . . . . . . . . . . . . . . . . 63 standard data frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 stuff error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 synchronization rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 synchronization segment . . . . . . . . . . . . . . . . . . . . . . . . . 36 t tec - transmitter error count . . . . . . . . . . . . . . . . . . . . . 42 time quanta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 transmit interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 transmit message aborting . . . . . . . . . . . . . . . . . . . . . . . 15 transmit message buffering . . . . . . . . . . . . . . . . . . . . . . 15 transmit message buffers . . . . . . . . . . . . . . . . . . . . . . . . 15 transmit message flowchart . . . . . . . . . . . . . . . . . . . . . . 16 transmit message priority . . . . . . . . . . . . . . . . . . . . . . . . 15 transmitter error passive . . . . . . . . . . . . . . . . . . . . . . . . . 46 transmitter warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 txbnctrl transmit buffer n control register . . . . . . . . 17 txbndm - transmit buffer n data field byte m . . . . . . . 20 txbneid0 - transmit buffer n extended identifier low . . 20 txbneid8 - transmit buffer n extended identifier mid . . 19 txbneidh - transmit buffer n extended identifier high . 19 txbnsidh - transmit buffer n standard identifier high . 18 txbnsidl - transmit buffer n standard identifier low . . 19 txnrts pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 txrtsctrl - txbnrts pin control and status register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 typical system implementation . . . . . . . . . . . . . . . . . . . . . 4 w wake-up functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 write instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 www, on-line support . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
? 2000 microchip technology inc. preliminary ds21291c-page 75 MCP2510 list of figures figure 1-1: block diagram . . . . . . . . . . . . . . . . . . . . . . 3 figure 1-2: typical system implementation . . . . . . . . . 4 figure 1-3: can buffers and protocol engine block diagram . . . . . . . . . . . . . . . . . . . . . . 5 figure 1-4: can protocol engine block diagram . . . . . 6 figure 2-1: standard data frame . . . . . . . . . . . . . . . . . 9 figure 2-2: extended data frame. . . . . . . . . . . . . . . . 10 figure 2-3: remote data frame . . . . . . . . . . . . . . . . . 11 figure 2-4: error frame . . . . . . . . . . . . . . . . . . . . . . . 12 figure 2-5: overload frame . . . . . . . . . . . . . . . . . . . . 13 figure 3-1: transmit message flowchart . . . . . . . . . . 16 figure 4-1: receive buffer block diagram . . . . . . . . . 22 figure 4-2: message reception flowchart . . . . . . . . . 23 figure 4-3: message acceptance mask and filter operation . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 5-1: bit time partitioning . . . . . . . . . . . . . . . . . 35 figure 5-2: lengthening a bit period . . . . . . . . . . . . . 37 figure 5-3: shortening a bit period. . . . . . . . . . . . . . . 38 figure 6-1: error modes state diagram . . . . . . . . . . . 42 figure 8-1: crystal/ceramic resonator operation . . . 49 figure 8-2: external clock source . . . . . . . . . . . . . . . 49 figure 8-3: external series resonant crystal oscillator circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 figure 11-1: bit modify . . . . . . . . . . . . . . . . . . . . . . . . . 58 figure 11-2: read instruction . . . . . . . . . . . . . . . . . . . . 58 figure 11-3: byte write instruction . . . . . . . . . . . . . . . . 58 figure 11-4: request to send instruction . . . . . . . . . . 59 figure 11-5: bit modify instruction . . . . . . . . . . . . . . . . 59 figure 11-6: read status instruction . . . . . . . . . . . . . . 59 figure 11-7: reset instruction . . . . . . . . . . . . . . . . . . 60 figure 11-8: spi input timing . . . . . . . . . . . . . . . . . . . . 60 figure 11-9: spi output timing . . . . . . . . . . . . . . . . . . 60 list of tables table 1-1: pin descriptions . . . . . . . . . . . . . . . . . . . . . 4 table 4-10: filter/mask truth table. . . . . . . . . . . . . . . 29 table 7-1: icod<2:0> decode . . . . . . . . . . . . . . . . . 45 table 10-1: can controller register map . . . . . . . . . . 55 table 10-2: control register summary . . . . . . . . . . . . 55 table 11-1: spi instruction set . . . . . . . . . . . . . . . . . . 58 table 12-1: dc characteristics. . . . . . . . . . . . . . . . . . 61 table 12-2: oscillator timing characteristics . . . . . . . 62 table 12-3: can interface ac characteristics . . . . . . 62 table 12-4: clkout pin ac/dc characteristics . . . . 62 table 12-5: spi interface ac characteristics . . . . . . . 63 list of registers register 3-1: txbnctrl transmit buffer n control register . . . . . . . . . . . . . . . . . . 17 register 3-2: txrtsctrl - txnrts pin control and status register . . . . . . . . . . . . . . . . . . . 18 register 3-3: txbnsidh - transmit buffer n standard identifier high. . . . . . . . . . . . . 18 register 3-4: txbnsidl - transmit buffer n standard identifier low . . . . . . . . . . . . . 19 register 3-5: txbneid8 - transmit buffer n extended identifier high . . . . . . . . . . . . 19 register 3-6: txbneid0 - transmit buffer n extended identifier low . . . . . . . . . . . . 19 register 3-7: txbndlc - transmit buffer n data length code . . . . . . . . . . . . . . . . . 20 register 3-8: txbndm - transmit buffer n data field byte m . . . . . . . . . . . . . . . . . 20 register 4-1: rxb0ctrl - receive buffer 0 control register . . . . . . . . . . . . . . . . . . 24 register 4-2: rxb1ctrl - receive buffer 1 control register . . . . . . . . . . . . . . . . . . 25 register 4-3: bfpctrl - rxnbf pin control and status register . . . . . . . . . . . . . . . . . . . 26 register 4-4: rxbnsidh - receive buffer n standard identifier high. . . . . . . . . . . . . 26 register 4-5: rxbnsidl - receive buffer n standard identifier low . . . . . . . . . . . . . 27 register 4-6: rxbneid8 - receive buffer n extended identifier mid . . . . . . . . . . . . . 27 register 4-7: rxbneid0 - receive buffer n extended identifier low. . . . . . . . . . . . . 27 register 4-8: rxbndlc - receive buffer n data length code . . . . . . . . . . . . . . . . . 28 register 4-9: rxbnd m - receive buffer n data field byte m . . . . . . . . . . . . . . . . . 28 register 4-10: rxfnsidh - acceptance filter n standard identifier high. . . . . . . . . . . . . 30 register 4-11: rxfnsidl - acceptance filter n standard identifier low . . . . . . . . . . . . . 31 register 4-12: rxfneid8 - acceptance filter n extended identifier high . . . . . . . . . . . . 31 register 4-13: rxfneid0 - acceptance filter n extended identifier low. . . . . . . . . . . . . 31 register 4-14: rxmnsidh - acceptance filter mask n standard identifier high. . . . . . . . . . . . . 32 register 4-15: rxmnsidl - acceptance filter mask n standard identifier low . . . . . . . . . . . . . 32 register 4-16: rxmneid8 - acceptance filter mask n extended identifier high . . . . . . . . . . . . 32 register 4-17: rxmneid0 - acceptance filter mask n extended identifier low. . . . . . . . . . . . . 33 register 5-1: cnf1 - configuration register1 . . . . . . 39 register 5-2: cnf2 - configuration register2 . . . . . . 40 register 5-3: cnf3 - configuration register3 . . . . . . 40 register 6-1: tec - transmitter error counter . . . . . . 42 register 6-2: rec - receiver error counter. . . . . . . . 42 register 6-3: eflg - error flag register . . . . . . . . . . 43 table 7-1: icod<2:0> decode. . . . . . . . . . . . . . . . 45 register 7-1: caninte - interrupt enable register . . 46 register 7-2: canintf - interrupt flag register . . . 47 register 9-1: canctrl - can control register . . . . 52 register 9-2: canstat - can status register . . . . . 53
information contained in this publication regarding device applications and the like is intended for suggestion only and may be superseded by updates. no representation or warranty is given and no liability is assumed by microchip technology incorporated with respect to the accuracy or use of such information, or infringement of patents or oth er intellectual property rights arising from such use or otherwise. use of microchip?s products as critical components in life support systems is not authorized except with express written approval by microchip. no licenses are conveyed, implicitly or otherwise, under any intellectual property rights. the microchip logo and name are registered trademarks of microchip technology inc. in the u.s.a. and other countries. all rights reserved. al l other trademarks mentioned herein are the property of their respective companies. ds21291c-page 76 ? 2000 microchip technology inc. all rights reserved. ? 2001 microchip technology incorporated. printed in the usa. 2/01 printed on recycled paper. americas corporate office microchip technology inc. 2355 west chandler blvd. chandler, az 85224-6199 tel: 480-786-7200 fax: 480-786-7277 technical support: 480-786-7627 web address: http://www.microchip.com atlanta microchip technology inc. 500 sugar mill road, suite 200b atlanta, ga 30350 tel: 770-640-0034 fax: 770-640-0307 boston microchip technology inc. 5 mount royal avenue marlborough, ma 01752 tel: 508-480-9990 fax: 508-480-8575 chicago microchip technology inc. 333 pierce road, suite 180 itasca, il 60143 tel: 630-285-0071 fax: 630-285-0075 dallas microchip technology inc. 4570 westgrove drive, suite 160 addison, tx 75248 tel: 972-818-7423 fax: 972-818-2924 dayton microchip technology inc. two prestige place, suite 150 miamisburg, oh 45342 tel: 937-291-1654 fax: 937-291-9175 detroit microchip technology inc. tri-atria office building 32255 northwestern highway, suite 190 farmington hills, mi 48334 tel: 248-538-2250 fax: 248-538-2260 los angeles microchip technology inc. 18201 von karman, suite 1090 irvine, ca 92612 tel: 949-263-1888 fax: 949-263-1338 new york microchip technology inc. 150 motor parkway, suite 202 hauppauge, ny 11788 tel: 631-273-5305 fax: 631-273-5335 san jose microchip technology inc. 2107 north first street, suite 590 san jose, ca 95131 tel: 408-436-7950 fax: 408-436-7955 americas (continued) toronto microchip technology inc. 5925 airport road, suite 200 mississauga, ontario l4v 1w1, canada tel: 905-405-6279 fax: 905-405-6253 asia/pacific hong kong microchip asia pacific unit 2101, tower 2 metroplaza 223 hing fong road kwai fong, n.t., hong kong tel: 852-2-401-1200 fax: 852-2-401-3431 beijing microchip technology, beijing unit 915, 6 chaoyangmen bei dajie dong erhuan road, dongcheng district new china hong kong manhattan building beijing 100027 prc tel: 86-10-85282100 fax: 86-10-85282104 india microchip technology inc. india liaison office no. 6, legacy, convent road bangalore 560 025, india tel: 91-80-229-0061 fax: 91-80-229-0062 japan microchip technology intl. inc. benex s-1 6f 3-18-20, shinyokohama kohoku-ku, yokohama-shi kanagawa 222-0033 japan tel: 81-45-471- 6166 fax: 81-45-471-6122 korea microchip technology korea 168-1, youngbo bldg. 3 floor samsung-dong, kangnam-ku seoul, korea tel: 82-2-554-7200 fax: 82-2-558-5934 shanghai microchip technology unit b701, far east international plaza, no. 317, xianxia road shanghai, 200051 p.r.c tel: 86-21-6275-5700 fax: 86-21-6275-5060 asia/pacific (continued) singapore microchip technology singapore pte ltd. 200 middle road #07-02 prime centre singapore 188980 tel: 65-334-8870 fax: 65-334-8850 taiwan, r.o.c microchip technology taiwan 10f-1c 207 tung hua north road taipei, taiwan, roc tel: 886-2-2717-7175 fax: 886-2-2545-0139 europe united kingdom arizona microchip technology ltd. 505 eskdale road winnersh triangle wokingham berkshire, england rg41 5tu tel: 44 118 921 5858 fax: 44-118 921-5835 denmark microchip technology denmark aps regus business centre lautrup hoj 1-3 ballerup dk-2750 denmark tel: 45 4420 9895 fax: 45 4420 9910 france arizona microchip technology sarl parc d ? activite du moulin de massy 43 rue du saule trapu batiment a - ler etage 91300 massy, france tel: 33-1-69-53-63-20 fax: 33-1-69-30-90-79 germany arizona microchip technology gmbh gustav-heinemann-ring 125 d-81739 m nchen, germany tel: 49-89-627-144 0 fax: 49-89-627-144-44 italy arizona microchip technology srl centro direzionale colleoni palazzo taurus 1 v. le colleoni 1 20041 agrate brianza milan, italy tel: 39-039-65791-1 fax: 39-039-6899883 11/23/99 w orldwide s ales and s ervice microchip received qs-9000 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in chandler and tempe, arizona in july 1999. the company?s quality system processes and procedures are qs-9000 compliant for its picmicro ? 8-bit mcus, k ee l oq ? code hopping devices, serial eeproms and microperipheral products. in addition, microchip ? s quality system for the design and manufacture of development systems is iso 9001 certified.


▲Up To Search▲   

 
Price & Availability of MCP2510

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X